You are on page 1of 39

Faculty of Business and Economics

Department of Economics
ECON10005 Quantitative Methods 1
Exercises: Replacement for Good Friday

Hypothesis testing for a mean

1
Upper tail test for a mean - the story so far...

We have a simple random sample X1 , … , Xn  from a population
with mean μ = E(Xi ).
ˉ  is an estimator of μ.
The sample mean X

Hypotheses: H0 : μ = m against HA : μ > m. (m is given.)

2
Upper tail test for a mean - the story so far...

We have a simple random sample X1 , … , Xn  from a population
with mean μ = E(Xi ).
ˉ  is an estimator of μ.
The sample mean X

Hypotheses: H0 : μ = m against HA : μ > m. (m is given.)


Null hypothesis

3
Upper tail test for a mean - the story so far...

We have a simple random sample X1 , … , Xn  from a population
with mean μ = E(Xi ).
ˉ  is an estimator of μ.
The sample mean X

Hypotheses: H0 : μ = m against HA : μ > m. (m is given.)


Null hypothesis Alternative hypothesis

4
Upper tail test for a mean - the story so far...

We have a simple random sample X1 , … , Xn  from a population
with mean μ = E(Xi ).
ˉ  is an estimator of μ.
The sample mean X

Hypotheses: H0 : μ = m against HA : μ>m. (m is given.)


Null hypothesis Alternative hypothesis
(upper tailed)

5
Upper tail test for a mean - the story so far...

We have a simple random sample X1 , … , Xn  from a population
with mean μ = E(Xi ).
ˉ  is an estimator of μ.
The sample mean X

Hypotheses: H0 : μ = m against HA : μ > m. (m is given.)


Null hypothesis Alternative hypothesis
(upper tailed)
ˉ −m
X a
Test statistic:  t = If H0  is true then t ∼ tn−1 .
s/ n

6
Upper tail test for a mean - the story so far...

We have a simple random sample X1 , … , Xn  from a population
with mean μ = E(Xi ).
ˉ  is an estimator of μ.
The sample mean X

Hypotheses: H0 : μ = m against HA : μ > m. (m is given.)


Null hypothesis Alternative hypothesis
(upper tailed)
ˉ −m
X a
Test statistic:  t = If H0  is true then t ∼ tn−1 .
s/ n

Decision rule: reject H0  if t is “far enough” into the upper tail
of the tn−1  distribution;
otherwise, do not reject H0 .
7
Example
μ : average drive length
with Nike ball
H0 : μ = 208

HA : μ>208
Sample: 
n = 100

ˉ −μ
X 209.45 − 208 ˉ = 209.45
X
t= = = 1.193 ⇐
s/ n 12.158/ 100 s = 12.158
8
Upper tail test decision rule at 5% significance level

P (tn−1 > t) = 0.05

Do not reject H0  for t in this range. Reject H0  for t in this range.9


Upper tail test decision rule: p-value form

From a calculated t-statistic, calculate p = P (tn−1 > t).

10
Upper tail test decision rule: p-value approach

From a calculated t-statistic, calculate p = P (tn−1 >t).


t = 1.193 ⇒ p = T.DIST.RT(1.193, 99) = 0.118

n = 100 ⇒ df = 99

11
Upper tail test decision rule: p-value approach

From a calculated t-statistic, calculate p = P (tn−1 >t).


t = 1.193 ⇒ p = T.DIST.RT(1.193, 99) = 0.118

“Right Tail”

p = P (tn−1 > t) = 0.118

t = 1.193

12
Upper tail test decision rule: p-value approach

From a calculated t-statistic, calculate p = P (tn−1 >t).


t = 1.193 ⇒ p =T.DIST.RT(1.193, 99) = 0.118

p > 0.05 ⇒ Do not reject H0

Conclusion: the evidence does not support Nike’s claim.

13
Upper tail test decision rule at 5% significance level

P (tn−1 > t) = 0.05

Do not reject H0  for t in this range. Reject H0  for t in this range.


14
Upper tail test decision rule: Critical Value approach
What is the value of t for which P (tn−1 > t) = 0.05?
Equivalent to P (tn−1 ≤ t) = 0.95.

P (tn−1 ≤ t) = 0.95

P (tn−1 > t) = 0.05

For n = 100 this value is T.INV(0.95,99) = 1.6604

(d.f. = n − 1) 15
Upper tail test decision rule, n = 100

P (tn−1 > t) = 0.05


“Critical value”
1.6604

Do not reject H0  for t in this range. Reject H0  for t in this range.


16
Upper tail test decision rule:  critical value approach

For given significance level α and degrees of freedom n − 1,
calculate the critical value tα,n−1  satisfying P (tn−1 > tα,n−1 ) = α.

Golf example: the critical value is t0.05, 99 = 1.6604
the t test statistic is t = 1.193
t < t0.05, 99 ⇒ Do not reject H0  at the 5% significance level.

Conclusion: the evidence does not support Nike’s claim.

Decisions from p-value and critical value rules must be the same.

17
Upper tail test decision rule: p-value and critical value approach
Distance of t into the upper tail can be measured by P (tn−1 > t).
P (tn−1 > t) is called the p-value for an upper tail test.
p in Excel: = T.DIST.RT(t, n − 1, TRUE)
Decision rule at significance level α :
reject H0  if p < α

Equivalently: 
reject H0  if t > tα,n−1
where tα,n−1  is the critical value satisfying P (tn−1 > tα,n−1 ) = α.
tα,n−1  in Excel: = T.INV(1 − α, n − 1)

18
Lower tail test for a mean
We have a simple random sample X1 , … , Xn  from a population
with mean μ = E(Xi ).
ˉ  is an estimator of μ.
The sample mean X

Hypotheses: H0 : μ = m against HA : μ<m. (m is given.)


Null hypothesis Alternative hypothesis
(lower tailed)
ˉ −m
X a
Test statistic:  t = If H0  is true then t ∼ tn−1 .
s/ n

Decision rule: reject H0  if t is “far enough” into the lower tail
of the tn−1  distribution;
otherwise, do not reject H0 .
19
Lower tail test decision rule: p-value and critical value forms
Distance of t into the lower tail can be measured by P (tn−1 < t).
P (tn−1 <t) is called the p-value for an lower tail test.
p in Excel: = T.DIST(t, n − 1, TRUE)
Decision rule at significance level α :
reject H0  if p < α

Equivalently: 
reject H0  if t < −tα,n−1
where tα,n−1  is the critical value satisfying P (tn−1 > tα,n−1 ) = α.
tα,n−1  in Excel: = T.INV(1 − α, n − 1)
−tα,n−1  in Excel: = T.INV(α, n − 1)

20
Example

μ : average change in
hours lost across all
departments
n = 50
H0 : μ = 0
(safety equipment
ineffective)
HA : μ<0
(safety equipment
effective)

α = 0.10
Decision rule: reject H0  if p < α = 0.10
21
Decision Rule: 
p value Approach

Reject H0  if p < α = 0.10

Critical Value Approach
Reject H0  if t<−t0.10, 49

22
}
ˉ = −1.20
X
−1.20
s = 5.063 t= = −1.676
5.063/ 50
n = 50

Decision rule using p-value:


p = T.DIST(-1.676, 49, TRUE) = 0.0501


p = P (t49 < t) = 0.0501
t = −1.676

23
}
ˉ = −1.20
X
−1.20
s = 5.063 t= = −1.676
5.063/ 50
n = 50

Decision rule using p-value:


p = T.DIST(-1.676, 49, TRUE) = 0.0501

Decision:  since p < α = 0.10,  we reject H0 .

Conclusion: there is evidence that the equipment is
⋮ effective at the 10% significance level.

24
}
ˉ = −1.20
X
−1.20
s = 5.063 t= = −1.676
5.063/ 50
n = 50

Decision rule using critical value at 10% significance:


−t0.10, 49 = T.INV(0.1, 49, TRUE) = −1.2991


P (t49 < −1.2991) = 0.10 Critical value  = −1.2991

25
}
ˉ = −1.20
X
−1.20
s = 5.063 t= = −1.676
5.063/ 50
n = 50

Decision rule using critical value at 10% significance:


−t0.10, 49 = T.INV(0.1, 49, TRUE) = −1.2991


t = −1.676 Critical value  = −1.2991

“rejection region” 26
}
ˉ = −1.20
X
−1.20
s = 5.063 t= = −1.676
5.063/ 50
n = 50

Decision rule using critical value at 10% significance:


−t0.10, 49 = T.INV(0.1, 49) = −1.2991

Decision:  since t < −t0.10, 49 ,  we reject H0 .

Conclusion: there is evidence that the equipment is
⋮ effective at the 10% significance level.

Decisions from p-value and critical value rules must be the same.

27
Two tail test for a mean
We have a simple random sample X1 , … , Xn  from a population
with mean μ = E(Xi ).
ˉ  is an estimator of μ.
The sample mean X

Hypotheses: H0 : μ = m against HA : μ=m. (m is given.)


Null hypothesis Alternative hypothesis
(two tailed)
ˉ −m
X a
Test statistic:  t = If H0  is true then t ∼ tn−1 .
s/ n

Decision rule: reject H0  if t is “far enough” into either tail
of the tn−1  distribution;
otherwise, do not reject H0 .
28
Two tail test decision rule: critical value approach

Decision rule at significance level α :
reject H0  if t > tα/2,n−1  or t < −tα/2,n−1
where tα/2,n−1  is the critical value satisfying P (tn−1 > tα/2,n−1 ) = α2 .

Equivalently, reject H0  if ∣t∣ > tα/2, n−1

tα/2,n−1  in Excel: = T.INV(1 − α/2, n − 1) or from the table.

α
If H0  is true : P (t > tα/2, n−1 ) = 2
α
P (t < −tα/2, n−1 ) = 2
α α
⇒ P (t > tα/2,n−1  or t < −tα/2,n−1 ) = 2 + 2 =α

This shows the decision rule has significance level of α. 29
Two tail test decision rule, 5% significance level

0.025 0.025

Reject H0 Do not reject H0 Reject H0 30


Example: IQ scores for children with Cochlear Implants

Does the mean IQ for children with CI’s differ from
the mean IQ for the general population (i.e. 100)?

31
Example: IQ scores for children with Cochlear Implants

Does the mean IQ for children with CI’s differ from
the mean IQ for the general population (i.e. 100)?
μ :  mean IQ for children with CI’s

H0 : μ = 100, HA : μ=100

32
Example: IQ scores for children with Cochlear Implants

Does the mean IQ for children with CI’s differ from
the mean IQ for the general population (i.e. 100)?
μ :  mean IQ for children with CI’s

H0 : μ = 100, HA : μ = 100
ˉ = 105.2222, s = 12.5356
n = 90, X
105.2222 − 100
t= = 3.95
12.5356/ 90
Default:
⋮ t0.025,89 = T.INV(0.975,  89) = 1.987 α = 0.05

α α
2 = 0.025 1− 2 = 0.975
Critical value decision rule: reject H0  if ∣t∣ > tα/2, n−1 33
Example: IQ scores for children with Cochlear Implants

Does the mean IQ for children with CI’s differ from
the mean IQ for the general population (i.e. 100)?
μ :  mean IQ for children with CI’s

H0 : μ = 100, HA : μ = 100
ˉ = 105.2222, s = 12.5356
n = 90, X
105.2222 − 100
t= = 3.95
12.5356/ 90
⋮ t0.025,89 = T.INV(0.975,  89) = 1.987

t > t0.025,98 ⇒ reject H0

The difference is significant at the the 5% level. 34
Two tail test decision rule: p-value approach

Critical value decision rule: reject H0  if ∣t∣ > tα/2, n−1


where tα/2,n−1  is the critical value satisfying P (tn−1 > tα/2,n−1 ) = α2 .

If ∣t∣ > tα/2, n−1  then P (tn−1 > ∣t∣) < P (tn−1 > tα/2, n−1 )
(i.e. ∣t∣ is “further into the tail” than tα/2, n−1 .)

35
Two tail test decision rule: p-value approach

Critical value decision rule: reject H0  if ∣t∣ > tα/2, n−1


where tα/2,n−1  is the critical value satisfying P (tn−1 > tα/2,n−1 ) = α2 .

If ∣t∣ > tα/2, n−1  then P (tn−1 > ∣t∣) < P (tn−1 > tα/2, n−1 )
α
2 P (tn−1 > ∣t∣) < 2 
2

36
Two tail test decision rule: p-value approach

Critical value decision rule: reject H0  if ∣t∣ > tα/2, n−1


where tα/2,n−1  is the critical value satisfying P (tn−1 > tα/2,n−1 ) = α2 .

 “reject H0  if ∣t∣ > tα/2, n−1 ”  is equivalent to

“reject H0  if p < α”  where p is the two-sided p-value

p = 2 P (tn−1 > ∣t∣)

37
Example: IQ scores for children with Cochlear Implants

Does the mean IQ for children with CI’s differ from
the mean IQ for the general population (i.e. 100)?
μ :  mean IQ for children with CI’s

H0 : μ = 100, HA : μ = 100
ˉ = 105.2222, s = 12.5356
n = 90, X
105.2222 − 100
t= = 3.95
12.5356/ 90
⋮ p = T.DIST.2T(ABS(3.95), 89) = 0.0002

p < 0.05 ⇒ reject H0

The difference is significant at the the 5% level. 38
Things to know

Hypothesis testing for a mean


One tail and two tail tests
t statistic
Significance level
Critical value decision rules
p-value decision rules

39

You might also like