ONE SAMPLE STUDENT T TEST

Author

LAKSHMINARASIMHAN P S

ABSTRACT

This paper discusses about a statistical test called T-test that compares the means of two samples. It is used in hypothesis testing, with a null hypothesis that the difference in group means is zero and an alternate hypothesis that the difference in group means is different from zero. It is usual first to formulate a null hypothesis, which states that there is no effective difference between the observed sample mean and the hypothesized or stated population mean — i.e., that any measured difference is due only to chance. In general, a t-test may be either two-sided (also termed two-tailed), stating simply that the means are not equivalent, or one-sided, specifying whether the observed mean is larger or smaller than the hypothesized mean. The test statistic t is then calculated. If the observed t-statistic is more extreme than the critical value determined by the appropriate reference distribution, the null hypothesis is rejected. The appropriate reference distribution for the t-statistic is the t distribution. The critical value depends on the significance level of the test (the probability of erroneously rejecting the null hypothesis)

INTRODUCTION

The ‘One sample T Test’ is one of the 3 types of T Tests. It is used when you want to test if the mean of the population from which the sample is drawn is of a hypothesized value.The one-sample t-test is a statistical hypothesis test used to determine whether an unknown population mean is different from a specific value.The test is done for continuous data. The data should be a random sample from a normal population.T Test was first invented by William Sealy Gosset, in 1908. Since he used the pseudo name as ‘Student’ when publishing his method in the paper titled ‘Biometrika’, the test came to be know as Student’s T Test.Since it assumes that the test statistic, typically the sample mean, follows the sampling distribution, the Student’s T Test is considered as a Parametric test. The t distribution is a family of curves in which the number of degrees of freedom (the number of independent observations in the sample minus one) specifies a particular curve. As the sample size (and thus the degrees of freedom) increases, the t distribution approaches the bell shape of the standard normal distribution. In practice, for tests involving the mean of a sample of size greater than 30, the normal distribution is usually applied.

ONE SAMPLE STUDENT T TEST

One sample t-test assumptions:

For a valid test, we need data values that are:

  • Independent (values are not related to one another).

  • Continuous.

  • Obtained via a simple random sample from the population.

Also, the population is assumed to be normally distributed.

The One Sample t Test is commonly used to test the following:

  • Statistical difference between a mean and a known or hypothesized value of the mean in the population.

  • Statistical difference between a change score and zero.

    • This approach involves creating a change score from two variables, and then comparing the mean change score to zero, which will indicate whether any change occurred between the two time points for the original measures. If the mean change score is not significantly different from zero, no significant change occurred.

Data requirements for one sample t-test:

The data must meet the following requirements:

  1. Test variable that is continuous (i.e., interval or ratio level)

  2. Scores on the test variable are independent (i.e., independence of observations)

    • There is no relationship between scores on the test variable

    • Violation of this assumption will yield an inaccurate p value

  3. Random sample of data from the population

  4. Normal distribution (approximately) of the sample and population on the test variable

    • Non-normal population distributions, especially those that are thick-tailed or heavily skewed, considerably reduce the power of the test

    • Among moderate or large samples, a violation of normality may still yield accurate p values

  5. Homogeneity of variances (i.e., variances approximately equal in both the sample and population)

  6. No outliers.

FORMULA

The test statistic for a One Sample t Test is denoted t, which is calculated using the following formula:

where

where

The calculated t value is then compared to the critical t value from the t distribution table with degrees of freedom df = n - 1 and chosen confidence level. If the calculated t value > critical t value, then we reject the null hypothesis.

Setting of null and alternate hypothesis: The null hypothesis usually assumes that there is no difference in the sample means and the hypothesized mean (comparison mean). The purpose of the T Test is to test if the null hypothesis can be rejected or not.

Depending on the how the problem is stated, the alternate hypothesis can be one of the following 3 cases:

  1. Case 1: H1 : x̅ != µ. Used when the true sample mean is not equal to the comparison mean.

  2. Case 2: H1 : x̅ > µ. Used when the true sample mean is greater than the comparison mean.

  3. Case 3: H1 : x̅ < µ. Used when the true sample mean is lesser than the comparison mean.

Where x̅ is the sample mean and µ is the population mean for comparison.

INTERPRETING THE RESULTS OF ONE SAMPLE STUDENT T TEST :

As discussed, a one sample t test compares the mean of a single column of numbers against a hypothetical mean. This hypothetical mean can be based upon a specific standard or other external prediction. The test produces a P value which requires careful interpretation.

The p value answers this question: If the data were sampled from a Gaussian population with a mean equal to the hypothetical value you entered, what is the chance of randomly selecting N data points and finding a mean as far (or further) from the hypothetical value as observed here?

If the p value is large (usually defined to mean greater than 0.05), the data do not give you any reason to conclude that the population mean differs from the designated value to which it has been compared. This is not the same as saying that the true mean equals the hypothetical value, but rather states that there is no evidence of a difference. Thus, we cannot reject the null hypothesis (H0).

If the p value is small (usually defined to mean less than or equal to 0.05), then it is unlikely that the discrepancy observed between the sample mean and hypothetical mean is due to a coincidence arising from random sampling. There is evidence to reject the idea that the difference is coincidental and conclude instead that the population has a mean that is different from the hypothetical value to which it has been compared. The difference is statistically significant, and the null hypothesis is therefore rejected.

If the null hypothesis is rejected, the question of whether the difference is scientifically important still remains. The confidence interval can be a useful tool in answering this question. Prism reports the 95% confidence interval for the difference between the actual and hypothetical mean. In interpreting these results, one can be 95% sure that this range includes the true difference. It requires scientific judgment to determine if this difference is truly meaningful.

APPLICATIONS

  • Manufacturing : A manufacturing engineer wants to know if some new process leads to a significant improvement in mean battery life of some product. 

    To test this, he measures the mean battery life for 50 products created using the new process and performs a one sample t-test to determine if the mean battery life is different from the mean battery life of products made using the current process.

  • Medicine : A doctor may want to know if some new drug leads to a significant reduction in blood pressure compared to the current standard drug used.

    To test this, he recruits 20 subjects to participate in a study in which they each take the new drug for one month. He can perform a one sample t-test to determine if the mean reduction in blood pressure is significantly greater than the mean reduction that results from the current standard drug.

  • Service Industry : A customer service company wants to know if their support agents are performing on par with industry standards. They can use the one sample t test on the time spent by each agent in the company towards a ticket resolution.

  • Farming : A farmer wants to know the increase in the yield from his farms after he used a new organic fertilizer, so he can use the one sample t test on the yields from multiple times after using the fertilizer.

PROBLEM

Question 1: We have the potato yield from 12 different farms. We know that the standard potato yield for the given variety is µ=20.

x = [21.5, 24.5, 18.5, 17.2, 14.5, 23.2, 22.1, 20.5, 19.4, 18.1, 24.1, 18.5]

Test if the potato yield from these farms is significantly better than the standard yield.

Solution:

Step 1: Define the Null and Alternate Hypothesis

H0: x̅ = 20

H1: x̅ > 20

n = 12. Since this is one sample T test, the degree of freedom = n-1 = 12-1 = 11.

Let’s set alpha = 0.05, to meet 95% confidence level.

Step 2: Calculate the Test Statistic (T)

Calculate sample mean

Calculate sample standard deviation

Substitute in the T Statistic formula

Step 3: Find the T-Critical Confidence level = 0.95, alpha=0.05. For d.o.f = 12 – 1 = 11, T-Critical = 1.796.

Step 4: Checking if it falls in rejection region Since the computed T Statistic is less than the T-critical, it does not fall in the rejection region.

Clearly, the calculated T statistic does not fall in the rejection region. So, we do not reject the null hypothesis.

CONCLUSION

We can conclude that the one sample student t test is very effective when we want to know whether our sample comes from a particular population but we do not have full population information available to us. It can be used to compare the sample mean with the population mean. It also helps us understand the likelihood of our results occurring because of chance.

REFERENCE

  1. https://www.graphpad.com/quickcalcs/oneSampleT1/
  2. https://libguides.library.kent.edu/SPSS/OneSampletTest
  3. https://en.wikipedia.org/wiki/Student%27s_t-test