You are on page 1of 51

Statistical Inference

and Confidence
Intervals
PUBH 6000/8000

1
Lecture Objectives

Define and describe statistical inference

Define and describe hypothesis testing

Calculate confidence intervals and hypothesis tests

2
Statistical Inference

Definition
Statistical inference is the act of using data in a particular
sample to make generalizations about the population from
which it came
Gerstman
2014

We are curious We calculate


about parameters statistics in the
in the population sample

3
Statistical Inference

Concepts
Parameters and statistics

Parameter Statistic

Source Population Sample

Constant Yes No

Mean

Standard deviation s

Proportion

4
Statistical Inference
Types of populations
Target
Population we want to study

Actual (sampled)
Those that have the chance to be in the study

Study sample
Those that are in the study

Actual population
5
Statistical Inference

Sampling behavior of the mean


Central limit theorem
The sampling distribution of s tend toward normality regardless of the
underlying distribution

Influence of the central limit theorem becomes strong as n gets large

6
Statistical Inference
A. Population (individual observations)

B. Sampling distributions of 7

Statistical Inference

Sampling behavior of a count and proportion


Normal approximation for a binomial proportion

np

npq

p probability of success for each


trial
q probability of failure = 1 p
8
9
Statistical inference

Two forms of statistical inference


Hypothesis testing

Estimation

10
Statistical Inference

Hypothesis testing

1. State hypothesis

2. Significance level determine alpha

3. Calculate test statistic [compare to critical value]

4. P-value and interpretation

5. Conclusion

11
Statistical Inference

Hypothesis testing
State hypotheses
Null hypothesis
H0
Claim of no difference in the population

Alternative hypothesis
Ha
Claim of difference

12
Statistical Inference

Example
Statement of the problem:
In the 1970s, 2029 year old men in the U.S. had a mean
body weight of 170 pounds

We want to test whether mean body weight in the population


now differs
Null hypothesis
H0: = 170 (no difference)
The alternative hypothesis can be stated in one of two ways
Ha: 170 (two-sided alternative)
Ha: > 170 (one-sided alternative)

13
Statistical Inference

Hypothesis testing
Significance level ()
Decided before conducting the test

Assume alpha set at 0.05 unless otherwise specified in this course

14
Statistical Inference

Hypothesis testing
Test statistic
x
z stat TS
SE x


SE x
n

15
Statistical Inference

Hypothesis testing
Goals
To reject H0 in favor of Ha

Method
Calculate a test statistic (TS)
Compare the TS to the critical value
If the |test statistic| is equal to or greater than the critical value, reject
the null
If the |test statistic| is less than the critical value, fail to reject the null
However, using SPSS this step is eliminated

16
Statistical Inference

Hypothesis testing
P-value
Could random variation alone account for the difference between H0
and observations from a random sample?

Small P-values are strong evidence against H0 and we reject H0


The findings are statistically significant

Large P-values dont give enough evidence against H0 and we fail to


reject H0

Compare p to our significance level

17
Statistical Inference

Hypothesis testing
Decision rule
p < , reject the null hypothesis

p > , fail to reject null hypothesis

18
Statistical Inference

Hypothesis testing
Errors
Type I error
probability of a Type I error (an erroneous rejection of a true null hypothesis)

Type II error
probability of a Type II error (erroneous retention of a false null hypothesis)

Power = 1 -

Truth

H0 true H0 false
Decision

Retain H0 Correct retention of H0 Type II error

Reject H0 Type I error Correct rejection

19
Statistical Inference

Hypothesis testing
State hypothesis

Significance level determine alpha


Assume alpha set at 0.05 unless otherwise specified in this course

Calculate test statistic

P-value and interpretation


p < , reject null
p > , fail to reject null hypothesis

Conclusion

20
Statistical Inference

Hypothesis testing
One-sample z test

H 0 : 0

H a : 0

x 0
z stat TS
n

21
Statistical Inference

Hypothesis testing
One-sample z test
Critical value for z-test
When = 0.05, CV (critical value) = 1.96

Determining p-values from zstat


Two sided
Table B
zstat is negative look up value in table and multiple by 2
2(table value)

zstat is positive look up value in table, subtract from 1, multiply by


2
2(1-table value)

22
Statistical Inference

23
Statistical Inference
Find a critical value for = 0.05

1. Divide by 2, (/2)
0.05 = 0.025
Area in each tail

2. Subtract 0.025 from 1


1 0.025 = .975

3. Look for 0.975 in the z-


table
= 1.96
This is your critical value for
= 0.05 (95% confidence level)

24
25
Statistical Inference

Example 1
A topic of recent clinical interest is the possibility of using
drugs to reduce infarct size in patients who have had a
myocardial infarction within the past 24 hours. Suppose we
know that in untreated patients the mean infarct size is 25
with a standard deviation of 10. In 8 patients treated with the
drug the mean infarct size is 16. Is the drug effective in
changing the infarct size (is the infarct size different from 25)?

26
Statistical Inference

Answer 1
State hypotheses
Is the infarct size different from 25?

H 0 : 25

H a : 25

27
Statistical Inference

Answer 1
Set the significance level

28
Statistical Inference

Answer 1
Calculate test
x
statistic z stat TS
n

16 25
z stat 2.54
10 8

29
Statistical Inference

Answer 1
Determine p-value
TS 2.54
p 2 0.0055 0.0110 0.05

30
Statistical Inference

Answer 1
Conclusion
H0: = 25; Ha: 25

p = 0.0110 < 0.05 p < 0.05, reject null

statistically significant difference

Infarct size is different from 25

31
Statistical Inference
Answer 1
Summary H 0 : 25
State hypotheses
H a : 25

Significance level

x
z stat TS
Calculate test n
statistic
16 25
z stat 2.54
10 8

P-value P<2(0.0055) = 0.0110 [p<0.05]

Conclusio Statistically significant difference - Infarct size is different 32


n
Statistical Inference

Example 2
The NCHS reported the mean total cholesterol level in 2002
for all adults was 203 and the standard deviation was 36.8. In
the offspring of the Framingham Heart Study (n = 3310), the
mean total cholesterol was 200.3. Is there statistical evidence
of a difference in mean cholesterol level (is the cholesterol
level different from 203)?

33
Statistical Inference

Answer 2
State hypotheses

Significance level

x
Calculate test z stat TS
statistic n

P-value

Conclusio 34
n
Statistical Inference

35
Statistical Inference

Confidence intervals
Estimation
Point estimation
Single estimate of the parameter

Interval estimation
Range of values that seeks to capture the parameter, confidence interval

Schematic of confidence interval 36


Statistical Inference
Confidence intervals
Confidence intervals for when is known

CI x z SE x
1
2


SE x
n
Alpha level Confidence Z value
level 1 z1(/2)
.10 .90 1.645
.05 .95 1.960
.01 .99 2.575

Common levels of and confidence


37
Statistical Inference

Example 3
Compute the 95% confidence interval for the mean body
temperature given that the mean temperature for a sample of
10 is 97.2F and the population standard deviation is 0.2F.

38
Statistical Inference

Answer 3


CI x z
1
2 n

0.2
CI 97.2 1.96
10

CI 97.2 0.1 97.1 F , 97.3 F

39
Statistical Inference

Example 4
We wish to estimate the average number of heartbeats per
minute for a certain population. The average number of
heartbeats per minute for a sample of 49 subjects was found
to be 90. Assume that these 49 patients constitute a random
sample, and that the population is normally distributed with a
standard deviation of 10. Construct the 90, 95, and 99
percent confidence intervals.

40
Statistical Inference

CI x z
Answer 4 1
2 n

41
Statistical Inference

Confidence intervals
Relationship between
hypothesis testing and
confidence intervals
When the value of the parameter
identified in the null hypothesis
(0) falls outside the interval, the
results will be statistically
significant (reject H0)

The figure rejects H0: = 180 at


=.05 because 180 falls outside
the 95% confidence interval.

It retains H0: = 180 at = .01


because the 99% confidence
interval captures 180.
42
Statistical Inference
Example 5
In a psychological study of abnormally hyperactive children,
there is an interest in determining whether such children
differ from normal children in creativity. A creativity
inventory has been standardized on a large population of
children. The mean score on the inventory for this population
is 150 and the standard deviation is 16. A random sample of
50 is selected from a population of hyperactive children. The
sample is administered the creativity inventory; the sample
mean is 152.1 and the standard deviation is 15.1. The
research question is Do abnormally hyperactive children
differ in creativity from normal children? Test the
appropriate null hypothesis and report a p-value.

43
Statistical Inference
H 0 : 150
Answer 5 H a : 150

150 x 0
z stat TS
x 152.1 n
n 50
16 152.1 150
TS 0.9281
s 15.1 16 50
know so use z test

p = 2(1 0.8238) = 0.3524 [p>0.05]

Fail to reject no difference

Abnormally hyperactive children do not differ in creativity from normal children


44
Statistical Inference

Example 6
Using the information from Example 5, calculate the 95%
confidence interval for the population mean when the sample
mean is 152.1 and the population standard deviation is 16.
The sample size is 50.

45
Statistical Inference
Answer 6

150
x 152.1
n 50 16
CI 95 152.1 1.96 152.1 1.96 2.26
16 50
s 15.1

CI 95 152.1 4.43 147.67, 156.53

since 150 is in the interval there is no difference

46
Statistical Inference

Example 7
The scores on a physical-performance test for boys of junior
high school age have been standardized with a mean of 175
and a standard deviation of 12 for the general population. In a
large city school system, a random sample of 225 junior high
school boys is tested. The sample mean is 173.6. Test whether
the sample mean differs from the population mean.

47
Statistical Inference

Answer 7

175 x 0
z stat TS
x 173.6 n
12
n 225

48
Statistical Inference

Example 8
Using the information from Example 7, calculate the 95%
confidence interval for the population mean when the sample
mean is 173.6 and the population standard deviation is 12.
The sample size is 225.

49
Statistical Inference
Answer 8

175
x 173.6
12
n 225

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

51

You might also like