One Sample T-Test

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Week

One-sample T-test
1
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.

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 known 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.

ONE SAMPLE T-TEST


Research is normally carried out in sample populations, but how close does
the sample reflect the whole population? The parametric one-sample t-test
determines whether the sample mean is statistically different from a known or
hypothesized population mean.
The null hypothesis (Ho) tested is that the sample mean is equal to the
population mean.

ASSUMPTIONS
Three assumptions are required for a one-sample t-test to provide a valid
result:

• The test variable should be measured on a continuous scale.


• The test variable data should be independent i.e. no relationship
between any of the data points.
• The data should be approximately normally distributed
• There should be no significant outliers.
RUNNING THE ONE SAMPLE T-TEST
Open one sample t-test.csv, this contains two columns of data representing
the height (cm) and body masses (kg) of a sample population of males used in
a study. In 2017 the average adult male in the UK population was 178 cm tall
and has a body mass of 83.6 kg.
Go to T-Tests > One-Sample t-test and in the first instance add height to the
analysis box on the right. Then tick the following options and add 178 as the
test value:

UNDERSTANDING THE OUTPUT


The output should contain three tables.

The assumption check of normality (Shapiro-Wilk) is not significant suggesting


that the heights are normally distributed, therefore this assumption is not
violated. If this showed a significant difference the analysis should be repeated
using the non-parametric equivalent, Wilcoxon’s signed-rank test tested
against the population median height.

This table shows that there are no significant differences between the means p
=.706

The descriptive data shows that the mean height of the sample population was
177.6 cm compared to the average 178 cm UK male.

Repeat the procedure by replacing height with mass and change the test value
to 83.6.

The assumption check of normality (Shapiro-Wilk) is not significant suggesting


that the masses are normally distributed.
This table shows that there is a significant difference between the mean
sample (72.9 kg) and population body mass (83.6 kg) p <.001

REPORTING THE RESULTS


A one-sample t-test showed no significant difference in height compared to the
population mean (t (22) = -0.382, p= .706), however, the participants were
significantly lighter than the UK male population average (t (22) =-7.159,
p<.001).

Example

Imagine we have collected a random sample of 31 energy bars from several different
stores to represent the population of energy bars available to the general consumer.
The labels on the bars claim that each bar contains 20 grams of protein.
If you look at the table above, you see that some bars have less than 20 grams of
protein. Other bars have more. You might think that the data support the idea that
the labels are correct. Others might disagree. The statistical test provides a sound
method to make a decision, so that everyone makes the same decision on the same set
of data values. 

Checking the data

Let’s start by answering: Is the t-test an appropriate method to test that the energy
bars have 20 grams of protein? The list below checks the requirements for the test.

 The data values are independent. The grams of protein in one energy bar do not
depend on the grams in any other energy bar. An example of dependent values
would be if you collected energy bars from a single production lot. A sample
from a single lot is representative of that lot, not energy bars in general.
 The data values are grams of protein. The measurements are continuous.
 We assume the energy bars are a simple random sample from the population of
energy bars available to the general consumer (i.e., a mix of lots of bars).
 We assume the population from which we are collecting our sample is normally
distributed, and for large samples, we can check this assumption.
We decide that the t-test is an appropriate method.

Before jumping into analysis, we should take a quick look at the data. The figure
below shows a histogram and summary statistics for the energy bars.
Figure 1: Histogram and summary statistics for the grams of protein in energy bars

From a quick look at the histogram, we see that there are no unusual points,
or outliers. The data look roughly bell-shaped, so our assumption of a normal
distribution seems reasonable.

From a quick look at the statistics, we see that the average is 21.40, above 20. Does
this average from our sample of 31 bars invalidate the label's claim of 20 grams of
protein for the unknown entire population mean? Or not?

Solution: Using JASP


REPORTING THE RESULTS
A one-sample t-test showed significant difference in protein content compared
to the population mean (t (30) = 3.067, p= .005). The mean of 31 sample bar is
significantly higher than the mean of the population.

Note:
If the p-value <.05, then the null hypothesis is rejected. That means there is a
significant different between the population mean and the sample mean.

Name: _____________________________________ Date: __________


Grade and Section: __________________________ Score: _________

Task sheet 1 (Q1-Wk2)

Statistics
Directions: Solve the following problems using JASP software. Report the results.

Suppose smart phone owners spends 190 minutes engaged with their phone, on
average, during a day. You collect a sample of 10 “social influencers” and record their
phone usage over 24-hour period. Use alpha .05, two tailed, to see if there is a
difference between social influencer and the general population of smart phone users.

Respondents Minutes Engaged with


Phone
1 195

2 192

3 188

4 205

5 197

6 187

7 220

8 194

9 192

10 220

2. Researchers are interested in whether the pulse rate of long-distance runners,


measure their resting pulse, and obtain the following data:
45, 42, 64, 54, 58, 49, 48, 56
The average resting pulse of athletes in the general population is 60 beats per
minutes.
Test the null hypothesis at the .05 level of significance.

You might also like