Anda di halaman 1dari 27

Hypothesis Testing and Comparison of Two Populations

Dr. Burton

If the heights of male teenagers are normally distributed with a mean of 60 inches and standard deviation of 10, And the sample size was 25, what percentage of boys heights in inches would be: Between 57 and 63

Lass than 58
61 or larger

7.2a
%

Height Z x-

57 57 - 60 10 / 25 63 - 60 10 / 25

60 0

63

Z= -1.5 = .4332 .8664 = 86.8% Z= 1.5 = .4332

Z=

s/ n

7.2b
%

Height Z Z= x- s/ n

58 60 -1.0 0 58 - 60 10 / 25

Z = -1.0 = .5000 - .3413


.1587 = 16%

7.2c
%

Height Z Z= x- s/ n 61 - 60 10 / 25

60 0

61
0.5

Z = 0.50

= 0.50 - .1915 = .3085 = 30.9%

Hypothesis Testing
Hypothesis: A statement of belief Null Hypothesis, H0: there is no difference between the population mean and the hypothesized value 0. Alternative Hypothesis, Ha: reject the null hypothesis and accept that there is a difference between the population mean and the hypothesized value 0.

Probabilities of Type I and Type II errors


H0 True a Accept H0 Test result Truth H0 False

Correct results 1-
Type I Error

b Type II

Error

c Reject H0

Correct results 1-

Differences
H0 True = statistically insignificant H0 False = statistically significant Accept H0 = statistically insignificant Reject H0 = statistically significant

http://en.wikipedia.org/wiki/False_positive

Probability Distribution for a two-tailed test

= 0.05

0.025

1.96 SE
-2 -1 0 1 2

0.025

-3

SE SE Magnitude of (XE XC) XE < XC XE > XC

Probability Distribution for a one-tailed test

1.645 SE
-3 -2 -1 0 1 2

= 0.05
3

SE SE Magnitude of (XE XC) XE < XC XE > XC

Box 10 - 5 t = Distance between the means


Variation around the means

Box 10 - 5 t = Distance between the means


Variation around the means

Box 10 - 5 t = Distance between the means


Variation around the means

t-Tests
Students t-test is used if:
two samples come from two different groups. e.g. A group of students and a group of professors

Paired t-test is used if:


two samples from the sample group. e.g. a pre and post test on the same group of subjects.

One-Tailed vs. Two Tailed Tests


The Key Question: Am I interested in the deviation from the mean of the sample from the mean of the population in one or both directions. If you want to determine whether one mean is significantly from the other, perform a two-tailed test. If you want to determine whether one mean is significantly larger, or significantly smaller, perform a one-tailed test.

t-Test
(Two Tailed)

Independent Sample means

x A - xB - 0

t =
Sp [ ( 1/NA ) + ( 1/NB) ]

df = NA + NB - 2

Independent Sample Means


Sample A (A Mean)2 26 34.34 24 14.90 18 4.58 17 9.86 18 4.58 20 .02 18 4.58 Mean = 20.14 A2 = 2913 N=7 (A Mean)2 = 72.86 Var = 12.14 s = 3.48 Sample B 38 26 24 24 30 22 (B Mean)2 113.85 1.77 11.09 11.09 7.13 28.41

Mean = 27.33 B2 = 4656 N=6 (B Mean)2 = 173.34 Var = 34.67 s = 5.89

Standard error of the difference between the means (SED)


SED of E - C =

A2
NA

B2

Population NB

Estimate of the SED of x E - x C =

s A2
NA

s B2

Sample

NB

Pooled estimate of the SED (SEDp)


Estimate of the SEDp of x A - x B =

1
Sp NA

NB

Sp =

s2(nA-1) + s2 (nB 1) n A+ nB - 2
12.14 (6) + 34.67 (5)

Sp = 7+ 6 - 2

22.38 = 4.73

t-Test (Two Tailed)


x A - xB - 0

t =
Sp [ ( 1/NA ) + ( 1/NB) ]

=
4.73

20.14 - 27.33 - 0 = -2.73


( 1/7 ) + ( 1/6)

d f = N E + N C - 2 = 11

Critical Value 95% = 2.201

One-tailed and two-tailed t-tests


A two-tailed test is generally recommended because differences in either direction need to be known.

Paired t-test
d = D/N

t paired = t p =

d - 0
Standard error of d

d - 0 = ------------Sd2 N

S d2 = df = N - 1

d2/ N-1

d 2 = D 2 ( D) 2 / N

Pre/post attitude assessment


Student 1 2 3 4 5 Before 25 23 30 7 3 After 28 19 34 10 6 Difference 3 -4 4 3 3 D squared 9 16 16 9 9

6
7 8 9 10

22
12 30 5 14

26
13 47 16 9

4
1 17 11 -5

16
1 289 121 25

Total

171

208

D = 37

D2 = 511

Pre/post attitude assessment


Student Total Before 171 After 208 Difference D squared 37 511

N = 10 d - 0 = ------------Sd2 N

t paired = t p =

d - 0 Standard error of d

d = D/N

= 37/10 = 3.7

= 3.7 / 41.5667 / 10
= 3.7 / 4. 15667

d 2 = D 2 ( D) 2 / N
= 511 - 1369/10 = 374.1 S d2 = d 2 / N - 1 = 374.1 / 10 1 = 41.5667

= 3.7 / 2.0387
= 1.815 df = N 1 = 9 0.05 > 1.833

Probabilities of Type I and Type II errors


H0 True Accept H0 Test result Truth H0 False

Correct results 1-
Type I Error

Type II Error Correct results 1-

Reject H0

Differences H0 True = statistically insignificant H0 False = statistically significant Accept H0 = statistically insignificant Reject H0 = statistically significant

Standard 2 X 2 table
Disease status Present Absent Risk Present Factor Status Absent Total Total

a c a+c

b d b+d

a+b c+d a+b+c+d

a = subjects with both the risk factor and the disease b = subjects with the risk factor but not the disease c = subjects with the disease but not the risk factor d = subjects with neither the risk factor nor the disease a + b = all subjects with the risk factor c + d = all subjects without the risk factor a + c = all subjects with the disease b + d = all subjects without the disease a + b + c + d = all study subjects

Standard 2 X 2 table
Disease status Present Absent Risk Present Factor Status Absent Total Total

a c a+c

b d b+d

a+b c+d a+b+c+d

Sensitivity = a/a+c Specificity = d/b+d

Diabetic Screening Program


Disease status Diabetic Nondiabetic Risk Factor Status >125mg/100ml <125mg/100ml Total Total

5 1 6

13 81 94

18 82 100

Sensitivity = a/a+c = 100 X 5/6 = 83.3% (16.7% false neg.) Specificity = d/b+d = 100 X 81/94 = 86.2%(13.8% false pos.)

Anda mungkin juga menyukai