View source: R/normalinference.R
normal_inference_pvalue | R Documentation |
Given a set of values assumed to sampled independently from a normal distribution, calculate the p-value for any hypothetical value of the distribution's mean.
normal_inference_pvalue(y, mu, sigma = NULL, na.rm = TRUE, verbose = FALSE)
y |
(numeric) A set of values assumed to be drawn independently from a normal distribution. |
mu |
(numeric) The hypothesized mean of the normal distribution. |
sigma |
(numeric) If not numeric, the assumed value of the standard deviation |
na.rm |
(logical) When calculating the sufficient statistics, do we remove NA's |
The standard deviation of the normal distribution can assumed to be known to have the value of the sample standard deviation. If so, the p-value is calculated assuming a normal sampling distribution.
If the standard deviation is not assumed to be known, the p-value is calculated using the t-distribution.
(numeric) A p-value for the hypothesis
y <- rnorm(10, mean = 1) normal_inference_pvalue(y, mu = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.