View source: R/kstepmalgorithm.R
find_critical_value | R Documentation |
This function finds the smallest x such that the probability of a random variable being less than or equal to x is greater than or equal to 1 - alpha. It uses the uniroot function to find where the empirical cumulative distribution function (ECDF) crosses 1 - alpha.
find_critical_value(ecdf_func, alpha)
ecdf_func |
An ECDF function representing the distribution of a random variable. |
alpha |
A numeric value specifying the significance level. |
The smallest x such that P(X <= x) >= 1 - alpha.
data <- rnorm(100)
ecdf_data <- ecdf(data)
critical_val <- find_critical_value(ecdf_data, 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.