One Sample T-test
One Sample T-test
Introduction
The One Sample t Test examines whether the mean of a population is statistically different from a known or hypothesized value. The One Sample t Test is a parametric test.
This test is also known as: single sample t test. The variable used in this test is known as: test variable.
Assumption
- The data are continuous
- The data are normally distributed
- The sample is a simple random sample form its population.
Hypotheses
The null hypothesis (H0) and alternative hypothesis (H1) of the one sample T test can be expressed as:
H0: µ = µ0 ("the population mean is equal to the hypothesized value")
H1: µ ≠ µ0 ("the population mean is not equal to the hypothesized value")
where µ is the "true" population mean and µ0 is the proposed value of the population mean.
Test Statistic
The test statistic for a One Sample t Test is denoted t, which is calculated using the following formula:
μ0= The test value -- the proposed constant for the population mean
x_bar = Sample mean
n = Sample size (i.e., number of observations)
s = Sample standard deviation
s_xbar= Estimated standard error of the mean (s/sqrt(n))
P-value
P-value = Pr(|t_n-1| > |t|) = 2Pr(t_n-1 > |t|)
If p-value is less than 0.05 significant level, then the null hypothesis is true, the population mean is equal to the hypothesized value.
If p-value is greater than 0.05 significant level, then the null hypothesis should be rejected, the population mean is not equal to the hypothesized value.
Relation with Linear Regression
Y = b_0 + e
Then,
H_0 : μ = hypothesized value <=> H_0 : b_0 = hypothesized value
H_1 : μ ≠ hypothesized value <=> H_1 : b_0 ≠ hypothesized value
R code
(from STA302 assignment)
Here is the example R code of one sample t-test about the relation between forearm length and height.
Reference
https://www.slideshare.net/ebogue/onesample-hypothesis-tests
https://libguides.library.kent.edu/SPSS/OneSampletTest



Very detailed!
ReplyDeleteGreat Explanation. Useful~
ReplyDeleteLearned a lot. Looking forwards to your next post.
ReplyDeleteThis looks similar with two sample t-test, hope get more understand about two sample t-test, overall it is enough for me right now, thank you so much~
ReplyDeleteyeah, to be very simple, their difference is comparing mean with another group or just a number.
DeleteGreat! This is a useful review on one sample t-test for me.
ReplyDeleteVery detailed formula, graph, R code and explanation for us to learn about One Sample T-test, thanks for sharing!
ReplyDeleteI took STA302 as well, I can see that you have a very deep understanding about the concept.
ReplyDeleteThanks! Let's talk about it when we are free.
Delete