You are on page 1of 45

Inference about a Mean

PUBH 6000/8000

1
Lecture Objectives
Calculate a one-sample t-test and
confidence interval
Calculate a paired sample t-test and
confidence interval

2
Assumptions 1-Sample t-
test
To obtain a valid result:
There must be no outliers
The dependent variable is normally
distributed in the population
The data must be independent

3
Inference about a Mean
We rarely know population standard
deviation instead, we calculate sample
standard deviations s and use this as an
estimate of
We then use s to calculate this estimated
standard error of the mean:
s
SE xbar
n
Using s instead of adds a source of
uncertainty z procedures no longer apply

use t procedures instead


4
Students t-test
A family of distributions identified by
Student (William Sealy Gosset) in
1908
identified by their degrees of
freedom, df.
t distributions are similar to z
distributions but with broader tails
As df increases t tails get skinnier
t become more like z
5
Inference about a Mean
Students t distribution

6
Inference about a Mean
One-sample t-test

x 0
TS t stat
SE x s
if TS t n 1, fail to reject
SE xbar
2 n
if TS t n 1, reject H 0
2

tn-1,/2 critical value


s = standard deviation of
sample 7
Inference about a Mean
Example 1
A study of psychological and
physiological changes in a cohort of
dialysis patients with end-stage renal
disease (ESRD) was conducted. Thirty-
six patients were ascertained. The mean
serum creatinine was 0.97 with a
standard deviation of 0.22. We want to
test the hypothesis that the actual
serum creatinine level was 0.80.
8
Step 1:
Claim is made regarding the mean
difference.
Two-tailed: (our hypothesis)
Is the serum creatinine different from
n = 36
0.80?
H 0 : 0.80 = 0.80
H a : 0.80 s = 0.22
Xbar = 0.97

9
Step 2:
Select the level of significance of
based upon the seriousness of making
a type 1 error. This will help you to
determine the critical value.

Usually unless told otherwise in


0.05
problem, it has a significance level of
0.05.

Visually it is represented in the 10


Step 3:
Compute the test statistic, or TS.
x 0 n = 36
TS t stat = 0.80
SE x s = 0.22
Xbar = 0.97

x 0 0.97 0.80
TS t stat 4.64
s n 0.22 36

12
Step 4:
Compare the critical value with the
test statistic

13
Less than
0.001 is out
here off table

TS=
4.64

14
Step 4:

t35 t30 2.042


TS t30 , p 0.001

always use the smaller


df its more
conservative So 30 15
Step 5:
State the conclusion
H0: = 0.80; Ha: 0.80
4.64 > 2.042 |TS| > CV, reject null
p < 0.001 < 0.05 p < 0.05, reject null
statistically significant difference
Serum creatinine level is different from 0.80

16
Inference about a Mean
Example 2
Natl. Center for Health Statistics (NCHS) has reported
mean total cholesterol as 203 in 2002. Suppose a new
drug is proposed to lower cholesterol and a study is
designed to evaluate the efficacy of the drug in lowering
cholesterol. Fifteen patients are enrolled in the study and
asked to take the new drug for 6 weeks. At the end of 6
weeks, each patients total cholesterol level was measured
and the sample statistics were as follows:
n = 15
xbar = 195.9
s = 28.7
Is there statistical evidence of a difference in mean total
cholesterol in patients using the new drug for 6 weeks?

17
Inference about a Mean
Answer 2
H 0 : 203
H a : 203

x 0 195.9 203
TS t stat 0.96
s n 28.7 15
t14 2.145
TS t14 , 0.30 p 0.40
no, not statistically significan t difference

18
p = 0.30
<TS<0.40

TS=
-0.96

19
Determining Confidence
Intervals
Confidence interval for

CI x t n 1, SE x
2

20
Determining Confidence
Intervals
Example 3
Calculate the 95% confidence interval
for the serum creatinine levels in
Example 1
xbar = 0.97
s = 0.22
n = 36
t30 = 2.042

21
Determining Confidence
Intervals
Answer 3
s
CI x t n 1
n
0.22
CI 0.97 2.042
36
CI 0.97 0.07 0.90, 1.04
0.80 not included so statistically different

Original Hypothesis 22
Determining Confidence
Intervals
Example 4
Calculate the 95% confidence interval
using the data from Example 2
xbar = 195.9
s = 28.7
n = 15
t14 = 2.145
Do on your own

23
Determining Confidence
Intervals
Answer 4
s
CI x t n 1
n
28.7
CI 195.9 2.145
15
CI 195.9 15.9 180.0, 211.8
203 is included so not statistically different

24
Paired Sample t-test

25
Inference about a Mean
(Paired Sample t-test)

Paired samples
Pretest/posttest studies
pre and post test (time 1 and time 2 on
same person);
Cross-over trials
(have group a and group b testing out med
compared to placebo. First 6 weeks group a
has med and b has placebo, next 6 weeks
group a has placebo and group b has med
crosses over so both groups get the med);
matched groups
Pair matches
each data point in one sample is matched to
a unique point in a second sample 26
Inference about a Mean
Paired samples
Also called matched-pairs and
dependent samples
xd 0
TS t stat
SE xd
if TS t n 1,
fail to reject
d 2

if TS t n reject H 0
d 1, 2

xbard may also be reported as


dbar
27
Inference about a Mean
Example 5
To study the effect of shell color on the
internal temperature of snails, brown
and yellow shells of about the same size
were matched. The shells were filled
with mercury, kept at the same level of
illumination, and the temperature of the
mercury was measured. Test the
hypothesis there was no difference in
temperature. Let = 0.05 and report p.
28
Inference about a Mean

Example 5 Brown
25.5
Yellow
25.6
Difference
-0.1
27.5 27.8 -0.3
27.3 26.3 +1.0
27.3 25.9 +1.4
29.2 28.0 +1.2
25.3 25.4 -0.1
26.4 25.6 +0.8
28.5 28.9 -0.4
28.1 27.2 +0.9
26.4 26.0 +0.4

paired samples are analyzed by creating a new variable


the within pair difference (may be called delta)

29
Inference about a Mean
Answer 5
State hypotheses
Is the mean of the difference different from
zero?
H 0 : d 0
H A : d 0

30
Inference about a Mean
Answer 5
Set significance level

0.05

31
Inference about a Mean
Answer 5
Calculate the test statistic (TS)
d 0
TS t stat
SEd

0.48 0
TS 2.2836
0.6647 10

32
Inference about a Mean
Answer 5
Compare to critical value (CV)

t9 2.262
TS t9 , 2.2836 2.262

33
Inference about a Mean
Answer 5
Determine p-value
TS = 2.2836
0.02 < p < 0.05

34
Inference about a Mean
Answer 5
d 0.48
sd 0.6647
d 0 0.48 0
TS t stat 2.2836
sd n 0.6647 10
TS t9 2.262
reject null , shell temperature is different
0.02 p 0.05
H 0 : d 0
or paired samples d is generally equal to 0
H A : d 0 35
Inference about a Mean
Answer 5
Conclusion
H0: d = 0; Ha: d 0
2.2836 > 2.262 |TS| > CV, reject null
0.02 < p < 0.05 p < 0.05, reject null
statistically significant difference
Mean difference is different from zero
Temperature is different between yellow and
brown shells

36
Inference about a Mean
Example 6
In the Framingham Offspring Study, participants
attend clinical examinations approximately
every four years. The data on the next slide are
systolic blood pressures measured at the sixth
and seventh examination in a subsample of n =
15 randomly selected participants. Test the
hypothesis that there was no difference in
systolic blood pressure.
dbar = 5.3
sd = 12.8

37
Inference about a Mean
ID Exam 6 SBP Exam 7 SBP
Example 6 1 168 141
2 111 119
3 139 122
4 127 127
5 155 125
6 115 123
7 125 113
8 123 106
9 130 131
10 137 142
11 130 131
12 129 135
13 112 119
14 141 130
15 122 121
38
Inference about a Mean
Answer 6
d 5.3
sd 12.8
d 0 5.3 0
TS t stat 1.603
sd n 12.8 15
TS t14 2.145
fail to reject null , SBP is not different
0.10 p 0.20

39
Determining Confidence
Intervals
Confidence interval for paired
samples
CI d t n 1,
SEd
d 2

40
Determining Confidence
Intervals
Example 7
What is the 95% confidence interval for
the shell temperatures in Example 5?
dbar = 0.48
sd = 0.6647
n = 10
t9 = 2.262

41
Determining Confidence
Intervals
Answer 7
s
CI d t n 1
n
0.6647
CI 0.48 2.262
10
CI 0.48 0.47 0.01, 0.95
0 not included so statistically different

42
Determining Confidence
Intervals
Example 8
Calculate the 95% confidence interval
using the data from Example 6?
dbar = 5.3
sd = 12.8
n = 15
t14 = 2.145

43
Determining Confidence
Intervals
Answer 8
s
CI d t n 1
n
12.8
CI 5.3 2.145
15
CI 5.3 7.1 1.8, 12.4
0 is included so not statistically different

44
Other References
Corty EW. Using and Interpreting Statistics A Practical Text for
Health, Behavioral, and Social Sciences. St. Louis, MO: Mosby
Elsevier, 2007.
Daniel WW. Biostatistics: A Foundation for Analysis in the Health
Sciences, Seventh Edition. New York: John Wiley & Sons, Inc.,
1999.
Hinkle DE, Wiersma W, Jurs G. Applied Statistics for Behavioral
Sciences, Fourth Edition. Boston, MA: Houghton Mifflin Co., 1998.
Pagano M, Gauvreau K. Principles of Biostatistics, Second Edition.
Pacific Grove, CA: Duxbury, 2000.
Rosner B. Fundamentals of Biostatistics, Seventh Edition. Boston,
MA: Brooks/Cole, 2011.
Schork MA, Remington RD. Statistics with Applications to the
Biological and Health Sciences, Third Edition. Upper Saddle River,
NJ: Prentice Hall, 2000.

45