test.mean: Hypothesis test for a mean

View source: R/statpsych1.R

test.meanR Documentation

Hypothesis test for a mean

Description

Computes a one-sample t-test for a population mean using the estimated mean, estimated standard deviation, sample size, and null hypothesis value. Use the t.test function for raw data input. A confidence interval for a population mean is a recommended supplement to the t-test (see ci.mean).

Usage

test.mean(m, sd, n, h)

Arguments

m

estimated mean

sd

estimated standard deviation

n

sample size

h

null hypothesis value of mean

Value

Returns a 1-row matrix. The columns are:

  • t - t test statistic

  • df - degrees of freedom

  • p - two-sided p-value

References

\insertRef

Snedecor1980statpsych

Examples

test.mean(24.5, 3.65, 40, 23)

# Should return:
#         t df          p
#  2.599132 39 0.01312665
 


statpsych documentation built on Sept. 11, 2024, 7:42 p.m.