one.sample.t | R Documentation |
Provides a one-sample hypothesis test. The test assumes that the underlying population is normal.
one.sample.t(data = NULL, null.mu = 0, xbar = NULL, sd = NULL, n = NULL,
alternative = "two.sided", conf = 0.95, na.rm = FALSE, fpc = FALSE, N = NULL)
data |
A vector of quantitative data. Not required if |
null.mu |
The expectation for the null distribution. |
xbar |
Sample mean. Not required if |
sd |
The sample standard deviation. Not required if |
n |
The sample size. Not required if |
alternative |
Type of test. One of three must be specified |
conf |
Confidence level. |
na.rm |
Logical, indicate whether |
fpc |
A logical statement specifying whether a finite population correction should be made. If |
N |
The population size. Required if |
The function can use either raw data is.null(data)==FALSE
or summarized data if is.null(data)==TRUE
. With the later xbar
, and n
must be specified by the user.
Returns a test statistic and a p-value.
Ken Aho. Thanks to Samuel Hale for identifying a function bug.
pt
one.sample.t(null.mu = 131, xbar = 126, sd = 12, n = 85,
alternative = "two.sided")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.