You are on page 1of 12

Single-sample t-test

Mohd Makmor Bakry, Ph.D., R.Ph.


Associate Professor of Clinical Pharmacy
Universiti Kebangsaan Malaysia
Hypothesis Tes,ng

Established
versus value/data (µ)

Sample value/data
of a group (x)
Assump,ons of the Single-
sample t-test

l  Independent observations
l  The population sampled must be normal.
The single-sample z-test revisited

σX X −µ
σX = z=
n σX

l  Usually σ (population sd) is unknown, therefore


σ will be estimated using sx (sample sd),
l  The sx will be used as an estimated standard
error (SE; sx_).
The single-sample t-test
Example of Scenario:
l  It is known that people’s average time to fall asleep is 17
minutes (µ).
l  A new sedative drug was developed to help people fall
asleep faster.
l  The drug was given to a sample of 20 people.
l  On average (x), these people fall asleep after 15 minutes
with SD, sX = 3.0.
l  Did the drug lower the time required to fall
asleep?
Step 1: State the Hypotheses
l  ? Directional versus non-directional
l  ‘Lower’ clue for directional
l  H0: The drug doesn’t help people fall asleep faster.
l  HA: The drug does help people fall asleep faster.

H0: µwith Drug ≥ µwithout Drug


HA: µwith Drug < µwithout Drug
Step 2: Set the Region of Rejec,on
l  Directional hypothesis = one-tail
l  Set α, and p = 1 - α
l  Calculate the degree of freedom, df = n – 1.
l  Refer to t-distribution table to determine the
critical t-value

df = n – 1 = 20 – 1 = 19
If two-tail, α/2
α = 0.05
p = 1 – 0.05 = 0.95
tcrit = [1.729]
Step 3: Compute the Test Sta,s,c

l  Use s to estimate σ, compute an estimated


standard error, sx_.
sX 3.0
sX = = = 0.671
N 20
l  Calculate the single-sample t-test; tvalue
x − µ 15 − 17
tvalue = = = −2.98
sX 0.671
Step 4: Evaluate H0
l  The tvalue falls in the region of rejection.
l  Therefore, reject H0 and conclude that the drug
makes people fall asleep significantly faster.

H0 rejection region

tcrit = [1.729] 0
tvalue = -2.98
Estimating µ for time to fall asleep
with drug using data from the sample
l  However, we could also look at an interval estimate using
the following formula:

µ = X ± ⎛⎜ s • t ⎞

withdrug ⎝ X value ⎠
= 15 ± (0.671• 2.98) = 15 ± 2.0
Upper limit = 15 + (2) = 17
Lower limit = 15 − (2) = 13
l  We can 95% confident that the true µ with drug is
somewhere between 13 and 17
Thank you

You might also like