SlideShare a Scribd company logo
1 of 83
6. Hypothesis Testing and the
Comparison of 2 or More
Populations
ASW Chapter 9 + Chapter 10
2
A) Introduction
 Estimating parameters of population
→ hypothesis testing on our model.
Model or Theory Deductions/Analysis
Testable Hypothesis
Data
Reject Theory
Accept Theory
(For Now)
Modify Theory
Empirical Result
1
2
3
4
5
Ch. 1-8,
12, 13
Economic
Theory
Ch. 9-11,
12, 13
Tests
3
Confidence Intervals and Hypothesis Testing
 Confidence intervals → range that μ falls into.
 NOW: is μ > 0, or > 1, etc.
 OR: is μ1 > μ2?
 Testing for specific values of μ.
 We have a confidence interval for Saskatchewan
female wages by age.
 What could we test here?
 We will have a confidence interval for Bachelor’s
salaries in Saskatchewan.
 What could we test here?
 Others: gasoline prices? Stock Market fluctuations?
4
B) Developing Null and Alternative Hypotheses
 Start with a testable hypothesis.
 Point of interest: do older women get paid more?
 Economic theory: is 0 < MPC < 1 and constant?
 Define it’s opposite:
 Older women’s salaries are < average.
 MPC is > 1.
 One is the Null hypothesis, the other is the Alternative
hypothesis.
 Use sample data to test the Null hypothesis.
 What if it is not that simple to have 2 opposites?
5
Which is the Null?
 General rule: the hypothesis with the = sign or the
< or the > sign is the Null.
 OR: the Null is something we assume is true
unless contradicted by the sample.
6
1. Research hypotheses:
 Testing an exception to the general rule, so it goes in
the alternative.
 E.g, testing if older women’s salaries (μ) > average:
H0: μ < μ(average)
HA: μ > μ(average)
 Results will tell us either:
 If testing shows H0 cannot be rejected (“accepted”)
→ implies that older women’s salaries are not
higher, but we cannot be sure.
 If testing shows H0 can be rejected → we can infer
HA is true, μ > μ(average).
7
2. Testing the Validity of a Claim
 Assume claim is true until disproven.
 E.G.: manufacturer’s claim of weight/container.
H0: μ > 100 grams.
HA: μ < 100 grams.
 Results will tell us either:
 If testing shows H0 cannot be rejected (“accepted”)
→ manufacturers claim not challenged.
 If testing shows H0 can be rejected → we can infer
manufacturer is lying.
8
3. Testing in Decision-Making
 Here, if either too high or too low, need to do
something.
 E.G.: is class length 75 minutes?
H0: μ = 75 minutes.
HA: μ ≠ 75 minutes.
 If H0 not rejected (accepted), no change in behaviour.
 If H0 rejected –> change behaviour.
9
C) Type I and Type II Errors
 Sample data → could have errors.
10
Type I and Type II Errors
Correct
Decision
Type II Error
Correct
Decision
Type I Error
Reject H0
Accept H0
H0 True H0 False
Conclusion
Population Condition
False Negative False Positive
11
False Positive or False Negative?
New claims over bungled
shooting of Brazilian
By Mark Sellman, Times
Online, and Daniel McGrory
U.K. police defend shoot-to-kill after mistake
…
Blair said Menezes had emerged from an
apartment block in south London that had been
under surveillance in connection with Thursday’s
attacks, and refused police orders to halt. Menezes
had also been wearing an unseasonably heavy
coat, further raising police suspicions.
MSNBC, July 24th.
12
Other Type I and Type II Errors
 Sampling songs.
 Health tests.
 Pregnancy tests.
 Jury decisions.
13
Level of Significance
 Hypothesis testing is really designed to control the
chance of a Type I error.
 Probability of Type I error = the level of significance.
 Selecting  (= level of significance )
 select probability of Type I error.
 What is the level of significance for Jury trials?
 We do not control for Type II errors
–> except by our language of stating “do not reject
H0”.
14
Level of Significance cont’d
  is picked by researcher –> normally 5%?
  = 5% → type I error happens only 5% of the time.
15
D) The probability value (p-value) approach
1. Develop null and alternative hypothesis.
2. Select level of significance .
3. Collect data, calculate sample mean and test statistic.
4. Use test statistic to calculate p-value.
5. Compare: reject H0 if p-value < .
 The sample implies that the alternative (your
research hypothesis) is true.
p-value approach
16
Hypothesis Testing: The Critical Value Approach
4. Use  to determine critical value and rejection rule.
5. Compare: if |test statistic| > |critical value|, reject H0.
 The sample implies that the alternative (your
research hypothesis) is true.
Critical-value approach
1. Develop null and alternative hypothesis.
2. Select level of significance .
3. Collect data, calculate sample mean and test
statistic.
17
Hypothesis Testing cont’d…
 This is essentially inverting our confidence index.
→ Is more than 2 standard deviations away from
some benchmark?
18
E) Population Mean, σ Known, One-Tailed Test
 Same hypothesis
 p-value method and critical value method.
 Example: a new employment program initiative has
been introduced to reduce time spent being
unemployed.
 Goal: 12 weeks or less unemployed.
 Population standard deviation believed to be 3.2
weeks.
 Sample of 40 unemployed workers, average time
unemployed 13.25 weeks.
 Assuming a level of significance () of .05, is the
program goal being met?
19
First (Common) Steps
 Hypothesis:
H0: μ < 12
HA: μ > 12
 Clearly 13.25 > 12.
 This casts doubt on our program goal (the null), and
whether we should continue it.
 Key: is it enough more, given sample size and
standard deviation, or is it just a (small) random
fluctuation?
20
Computing the Test Statistic
 Under our assumptions: use the standard normal.
 Use sample mean to calculate test statistic


 
  
13.25 12
2.47
/ 3.2/ 40
x
z
n
 Is this z big enough to reject the null hypothesis?
 Next, go our two routes:
Calculate p-value OR z-critical.
21
Calculating the p-value
 Given the z-value, what is the corresponding
probability?
0 Z=2.47 z
p=??
 This is the probability that 13.25 > 12 by chance.
22
Calculating the p-value cont’d
 Find 2.47 on the Standard Normal Distribution tables:
z .00 .01 .02 .03 .04 .05 .06 .07 .08 .09
…
2.3
2.4 .4918 .4920 .4922 .4925 .4927 .4929 .4931 .4932 .4934 .4936
2.5
…
23
Calculating the p-value cont’d
 .4932 is the probability of being between 0 and z=2.47.
 p = 0.5 – 0.4932 = 0.0038.
0 Z=2.47 z
0.4932
24
Should We Reject the Hypothesis?
 This says that the probability of getting a sample mean
of 13.25 when the true mean is 12 = .0038 or less than
½ of 1 percent.
 Our significance level was only 5%, so we reject the
null.
 We are 99.62% certain that the program has failed.
25
Rejection of the Null
0 Z=2.47 z
0.0038
Z.05
Sometimes we say: “significant at the 0.38% level”.
26
Critical Value Approach
 This is an alternative you often see in textbooks or
articles.
 Find the value of z.05, and compare it to the test value
of z (2.47).
 From the tables, z.05 = 1.645.
 Because 2.47 > 1.645, reject H0.
27
Rejection
0 Z=2.47 z
Z.05= 1.645
28
Excel
 Let’s do this example in Excel.
 Look at Appendix 9.2 in text, especially Figure 9.8
29
F) Population Mean, σ Known, Two-Tailed Test
 Null: μ = μ0 → Alternative is μ ≠ μ0.
 Must examine two areas of the distribution.
 Example:
 Price/earnings ratios for stocks.
 Theory: stable rate of P/E in market = 13.
If P/E (market) < 13, you should invest in the
stock market.
If P/E (market) > 13, you should take your
money out.
30
Estimate Steps
 Can we estimate if the population P/E is 13 or not?
 Common steps:
 Set hypothesis:
H0: μ = 13
HA: μ ≠ 13
 Select  = .05.
 Calculate standard error.
 Calculate z-value.
31
Calculating Test Statistic
 We have a sample of 50
 = 12.1.
 Historical σ = 3.0456.
4307
.
0
50
0456
.
3
Error
Standard x 


n


0896
.
2
4307
.
0
13
1
.
12
-
x
value
x
0








z
32
p-value Approach
 Calculate the p-value.
 We will calculate for the lower tail
→ then make an adjustment for the upper tail.
33
p-value, Two-Tailed Test
0 Z=2.09 z
Z=–2.09
p(z < –2.09) = ?? p(z > 2.09) = ??
We can just calculate one value, and double it.
34
Calculating the p-value cont’d
 Find 2.090 on the Standard Normal Distribution
tables:
z .00 .01 .02 .03 .04 .05 .06 .07 .08 .09
…
1.9
2.0 .4772 .4778 .4783 .4788 .4793 .4798 .4803 .4808 .4812 .4817
2.1
…
35
p-value, Two-Tailed Test
0 Z=2.09 z
Z=–2.09
p(z < –2.09) = ??
p(z > 2.09) = 0.5 -.4817
= 0.0183
Doubling the value, we find the p-value = 0.0366
0.4817
36
Should We Reject the Null Hypothesis?
 Yes!
 p-value = 0.0366 <  = 0.05.
 There is only a 3.66% chance that the measured
price/earnings ratio sample mean of 12.1 is not equal to
the stable rate of 13 by random chance.
37
Critical Value Approach
 Reject the null hypothesis if:
test z-value > critical value
or if
test z-value < critical value
 Two tailed test:  = 0.05 → need critical value for
/2 = 0.025.
 The tables tell us that this is 1.96.
38
G) Population Mean, σ Unknown
 σ unknown → must estimate it with our sample too
→ use t-distribution, n – 1 degrees of freedom.
n
s

x
Error
Standard 
x
0
-
x
value




t
39
One-tailed Test, p-value Approach
 Steps:
1. Set up hypothesis.
2. Decide on level of significance ()
3. Collect data, calculate sample mean and test
statistic.
4. Use test statistic & t-table/Excel to calculate p-
value.
5. Compare: reject H0 if p-value < .
40
The RCMP periodically samples
vehicle speeds at various locations
on a particular roadway.
The sample of vehicle speeds
is used to test the hypothesis
Example: Highway Patrol
The locations where H0 is rejected are deemed
the best locations for radar traps.
H0:  < 65
41
Example: Highway Patrol
Outside Lumsden:
A sample of 64 vehicles
–> average speed = 65.5 mph
–> standard deviation = 4.2 mph.
Use  = .05 to test the hypothesis.
42
Common to Both Approaches
1. Determine the hypotheses.
2. Specify the level of significance.
3. Compute the value of the test statistic.
 = .05
H0:  < 65
Ha:  > 65
9524
.
64
/
2
.
4
65
5
.
65
-
x
value
x
0







t
43
4. Estimate the p-value From t-Distribution Table
 Must “interpolate” the value of t = 0.9524, df = 65
Degrees
of
Freedom
Area in Upper Tail
0.20 0.10 0.05 0.025 0.01 0.005
1
…
50 .849 1.299 1.676 2.009 2.403 2.678
60 .848 1.296 1.671 2.000 2.390 2.660
80 .846 1.292 1.664 1.990 2.374 2.639
…
0.9524 .10 < p–value < .20
44
p –Value Approach
5. Determine whether to reject H0.
Because p–value >  = .05, we do NOT reject H0.
We are at least 95% confident that the mean speed
of vehicles outside Lumsden is LESS than OR
EQUAL TO 65 mph.
45
5. Determine whether to reject H0.
Because 0.9524 < 1.669, we do NOT reject H0.
Critical Value Approach
For  = .05 and d.f. = 64 – 1 = 63, t.05 = 1.669
4. Determine the critical value and rejection rule.
Reject H0 if t > 1.669
46
H) Introduction: Comparing Population Differences
 Do men get paid more than women?
 $46,452 for men vs. $35,122 for women (bachelors).
 Do more 100-level Economics courses help you in Econ
201?
 Has the crime rate risen?
 Are there more hurricanes
recently?
47
Key point: the role of standard deviation
1
x 2
x
1
x 2
x
Probably the
same
Probably
different
48
Comparing 2 Populations
 True population means: 1 and 2.
 Random sample of n1 –> 1.
 Versus random sample of n2 –> 2.
 Transform into problem: is 1 – 2 = 0?
 Assuming 1 and 2 known –> use z-test.
 If unknown –> estimate ’s from sample s’s, and
use t-test.
49
I) Confidence Intervals, 2 Means: ’s Unknown
 How important is an extra introductory course in
determining your grade in Economics 201?
 Data:
 Natural experiment.
 59 students.
 43 had only one 10x course.
 16 had two 10x courses.
 Final exam grades:
 One 10x: average = 61.69%, s1 = 22.65, n1 = 43.
 Two 10x: average = 75.11%, s2 = 12.80, n2 = 16.
50
Confidence Interval Estimation
 Point estimator: 1 – 2.
 Standard error of 1 – 2 is:
2
2
2
1
2
1
2
1
n
s
n
s
x
x 



51
Confidence Interval cont’d
 Confidence interval of difference in means:
1 – 2 + Margin of Error
 Typically use α = 0.05.
 Margin of error:
2
2
2
1
2
1
2
/
2
1
n
s
n
s
t
x
x 

 
52
Degrees of Freedom
 One UGLY formula:
2
2 2
1 2
1 2
2 2
2 2
1 2
1 1 2 2
1 1
1 1
s s
n n
df
s s
n n n n
 

 
 

   

   
 
   
 In this example: df = 47.36 → round down to 47.
 95% confidence interval → t0.025.
 For 47 degrees of freedom, table says: 2.012.
53
Confidence Interval cont’d.
or
2
2
2
1
2
1
2
/
2
1
n
s
n
s
t
x
x 

 
or
16
79
.
163
43
17
.
513
012
.
2
11
.
75
86
.
61 


54
Confidence Interval cont’d.
or
9.475
13.25
-
or
4.709
*
2.012
13.25
-


22.725
-
to
3.775
-
55
Confidence Interval
 We are 95% confident that students with only one 10x
course scored between 3.775% and 22.725% lower
than students with two 10x courses.
 Next step would be: why, how??
56
J) Hypothesis Tests, 2 Means: ’s Unknown
 Two datasets –> is the mean value of one larger than
the other?
 Is it larger by a specific amount?
 μ1 vs. μ2 –> μ1 – μ2 vs. D0.
 Often set D0 = 0 –> is μ1 = μ2?
57
Example: Female vs. Male Salaries
 Saskatchewan 2001 Census data:
- only Bachelor’s degrees
- aged 21-64
- work full-time
- not in school
 Men: M = $46,452.48, sM = 36,260.1, nM = 557.
 Women: W = $35,121.94, sW = 20,571.3, nW = 534.
 M – W = $11,330.44 } our point estimate.
 Is this an artifact of the sample, or do men make
significantly more than women?
58
Hypothesis, Significance Level, Test Statistic
 We will now ONLY use the p-value approach, and
NOT the critical value approach.
 Research hypothesis: men get paid more:
1. H0: μM – μW < 0
H1: μM – μW > 0
2. Select  = 0.05
3. Compute test t-statistic:
375
.
6
534
426178351
557
1314794928
0
)
94
.
35121
48
.
46452
(
)
(
2
2
0









W
W
M
M
W
M
n
s
n
s
D
x
x
t
59
4. a. Compute the Degrees of Freedom
 Can compute by hand, or get from Excel:
2
2 2
1 2
1 2
2 2
2 2
1 2
1 1 2 2
1 1
1 1
s s
n n
df
s s
n n n n
 

 
 

   

   
 
   
= 888
60
4. b. Computing the p-value
Degrees of
Freedom 0.20 0.10 0.02 0.025 0.01 0.005
…
100 .845 1.290 1.660 1.984 2.364 2.626
 .842 1.282 1.645 1.960 2.326 2.576
6.375 up here somewhere
The p-value <<< 0.005.
61
5. Check the Hypothesis
 Since the p-value is <<< 0.05, we reject H0.
 We conclude that we can accept the alternative
hypothesis that men get paid more than women at a
very high level of confidence (greater than 99%).
62
Excel
t-Test: Two-Sample Assuming Unequal Variances
Male Female
Mean 46452.47935 35121.94195
Variance 1314794928 423178351.3
Observations 557 534
Hypothesized Mean Diff. 0
df 888
t Stat 6.381034789
P(T<=t) one-tail 1.41441E-10 .00000000014
t Critical one-tail 1.646571945
P(T<=t) two-tail 2.82883E-10
t Critical two-tail 1.962639544
63
Summary
 Hypothesis tests on comparing two populations.
 Convert to a comparison of the difference to a
standard.
 More complex standard deviation and degrees of
freedom.
 Same methodology as comparing other hypothesis
tests.
64
K) Statistical vs. Practical Significance
 Our tests: statistically significantly
 Real world interest:practical significance.
 Men vs. women: the difference is statistically
significant AND practically:
$46,452.48 vs $35,121.94
 Saskatchewan, full-time, Bachelor’s:
Women make only 75.6% of men, same average
education level.
65
Source: Leader-Post, Oct. 31, 2008
66
L) Matched Samples
 Controlled experiment –> match individuals in each
group.
 Matched samples –> each individual tries each method
in turn.
 Variation between samples not a problem.
 Focus on difference data.
 Independent samples –> the norm in economics.
 Regression analysis.
67
M) Introduction to ANOVA
 What if we want to compare 3 or more sample means
(treatment means)?
 Example: total income, Saskatchewan females
employed full-time and full-year, by age, 2003
(Source: See Oct. 8th lectures)
Age group Income in thousands of
dollars
Sample size
Mean Standard
deviation
25-34 33.3 13.5 55
35-44 40.3 20.7 57
45-54 45.1 25.9 37
55-64 40.1 25.9 31
Overall weighted
average = 38.2
68
ANOVA’s Hypotheses
4 different populations.
equal
are
means
population
all
Not
:
: 4
3
2
1
0
A
H
H 


 


There is one true population mean and 4 sample variations.
69
N) Steps of ANOVA
1. Set up the Hypothesis Statements
H0: μ1 = μ2 = μ3 = μ4 = … = μk
HA: Not all population means are equal
2. Collect your sample data:
Means: 1, 2, 3, 4, … k
Variances:s2
1, s2
2, s2
3, s2
4 ,… s2
k
Sample Sizes: n1, n2, n3, n4,… nk
70
Steps of ANOVA Continued
4. Calculate the overall average:
k
k
k
n
n
n
n
x
n
x
n
x
n
x
n
x









...
...
3
2
1
3
3
2
2
1
1
5. Create our two estimates of 2.
71
Step 5 a) Estimating 2 via SSTR
 Between-treatments estimate of 2 or
sum of squares due to treatments (SSTR).
 This compares to , and constructs an estimate of 2
based on the assumption the Null Hypothesis is true:
2
2
2
2
2
1
1
1
2
)
(
...
)
(
)
(
)
(
SSTR
x
x
n
x
x
n
x
x
n
x
x
n
k
k
k
j j
j








  
s
xj ' x
72
Step 5 b) Estimating 2 via SSE
 Within-treatments estimate of 2 or
the sum of squares due to error (SSE).
 This takes the weighted average of the sample sj
2 as
an estimate of 2 and is a good estimate regardless
of whether the Null is true:
2
2
2
2
2
1
1
1
2
)
1
(
...
)
1
(
)
1
(
)
1
(
SSE
k
k
k
j
j
j
s
n
s
n
s
n
s
n








 

73
Step 6: Testing The Null
 If Null true, both estimates should be similar, and
SSTR ≈ 1.
SST
 If ratio >>> 1  reject the Null, accept the
Alternative that there is multiple population
distributions.
74
Steps of ANOVA
1. Set up the Hypothesis Statement.
(Null: all means are equal)
2. Collect the sample data.
3. Select level of significance –> α = 0.05.
4. Calculate the overall average.
5. a) Estimate 2 via
sum of squares due to treatments (SSTR).
b) estimate of 2 via
sum of squares due to error (SSE).
6. If Null true, both estimates should be similar, and
STR ≈ 1.
SST
75
MSTR and MSE
 MSTR = sum of squares due to treatment
numerator degrees of freedom
= sum of squares due to treatment
no. of treatments – 1
= SSTR
k-1
 MSE = Sum of squares due to error
denominator degrees of freedom
= Sum of squares due to error
total no. of obs. – no. of treatments
= SSE
nT – k
df1
df2
76
F-test
 F-statistic = MSTR  k-1 degrees of freedom (df1)
MSE  nT – k degrees of freedom (df2)
 If H0 is true, MSTR ≈ MSE → F-statistic ≈ 1.
 If H0 is false
→ p-value is < level of significance (α).
→ F-statistic is higher than critical value from the
table/Excel.
77
F-Distribution
MSE
MSTR

F
0 Ftest-value
1
MSE
MSTR
y that
Probabilit 
78
O) Saskatchewan Female Wages Example
 Example: total income, Saskatchewan females
employed full-time and full-year, by age, 2003
(Source: See Oct. 8th lectures)
Age Group Mean Income Variance =
(St. Dev.)2
Sample Size
25-34 33.3 (13.5)2 = 182.25 55
35-44 40.3 (20.7)2 = 428.49 57
45-54 45.1 (25.9)2 = 670.81 37
55-64 40.1 (25.9)2 = 670.81 31
Overall weighted
average = 38.2
79
Calculating the MSTR, MSE
5
.
1148
3
/
4
.
3445
)
1
/(
4
.
3445
)
2
.
38
1
.
40
(
31
)
2
.
38
1
.
45
(
37
)
2
.
38
3
.
40
(
57
)
2
.
38
3
.
33
(
55
)
(
)
(
)
(
)
(
)
(
SSTR
2
2
2
2
2
4
4
2
3
3
2
2
2
2
1
1
1
2






















  
k
SSTR
MSTR
x
x
n
x
x
n
x
x
n
x
x
n
x
x
n
k
j j
j
8
.
443
)
4
180
/(
4
.
78110
)
/(
4
.
78110
81
.
670
*
30
81
.
670
*
36
49
.
428
*
56
25
.
182
*
54
)
1
(
)
1
(
)
1
(
)
1
(
)
1
(
SSE
2
4
4
2
3
3
2
2
2
2
1
1
1
2



















 

k
N
SSE
MSE
s
n
s
n
s
n
s
n
s
n
T
k
j
j
j
80
Calculating F-Stat and p-value
Ftest-value = MSTR = 1148.5 = 2.59
MSE 443.8
MSE
MSTR

F
0 2.59
?
value
-
P 
81
F-Table for df1 = 3 and df2 = 176
Denomina-
tor degrees
of freedom
(df2) (MSE)
Area in
Upper Tail
Numerator degrees of freedom (df1)
(MSTR)
2 3 4
100 .10
.05
.025
.01
… 2.14
2.70
3.25
3.98
1000 .10
.05
.025
.01
… 2.09
2.61
3.13
3.80
Clearly the p-value > 0.05
–> accept the Null of one
distribution
176 degrees of
freedom,
F=2.59
in here.
82
Excel F-test formula
 =FDIST(F-value, df1, df2) –> yields value of .0544.
MSE
MSTR

F
0 2.59
0.0544
value
-
P 
83
P) Econometrics for Dummies…
 Instead of ANOVA, economists tend to use Regression
analysis + “dummy” variables.
 Gives us the direction and size of the differences in
mean values.
 But ANOVA is a useful first step.

More Related Content

Similar to Hypothesis Testing techniques in social research.ppt

Statr session 15 and 16
Statr session 15 and 16Statr session 15 and 16
Statr session 15 and 16Ruru Chowdhury
 
Introduction to hypothesis testing ppt @ bec doms
Introduction to hypothesis testing ppt @ bec domsIntroduction to hypothesis testing ppt @ bec doms
Introduction to hypothesis testing ppt @ bec domsBabasab Patil
 
General concept for hypohtesis testing
General concept for hypohtesis testingGeneral concept for hypohtesis testing
General concept for hypohtesis testingNadeem Uddin
 
Lesson05_new
Lesson05_newLesson05_new
Lesson05_newshengvn
 
Telesidang 4 bab_8_9_10stst
Telesidang 4 bab_8_9_10ststTelesidang 4 bab_8_9_10stst
Telesidang 4 bab_8_9_10ststNor Ihsan
 
1667390753_Lind Chapter 10-14.pdf
1667390753_Lind Chapter 10-14.pdf1667390753_Lind Chapter 10-14.pdf
1667390753_Lind Chapter 10-14.pdfAriniputriLestari
 
Lesson05_Static11
Lesson05_Static11Lesson05_Static11
Lesson05_Static11thangv
 
hypothesisTestPPT.pptx
hypothesisTestPPT.pptxhypothesisTestPPT.pptx
hypothesisTestPPT.pptxdangwalakash07
 
Statistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docxStatistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docxdessiechisomjj4
 
8. testing of hypothesis for variable &amp; attribute data
8. testing of hypothesis for variable &amp; attribute  data8. testing of hypothesis for variable &amp; attribute  data
8. testing of hypothesis for variable &amp; attribute dataHakeem-Ur- Rehman
 

Similar to Hypothesis Testing techniques in social research.ppt (20)

Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
 
Statr session 15 and 16
Statr session 15 and 16Statr session 15 and 16
Statr session 15 and 16
 
Testing a claim about a proportion
Testing a claim about a proportion  Testing a claim about a proportion
Testing a claim about a proportion
 
S05 ad4001
S05 ad4001S05 ad4001
S05 ad4001
 
S06
S06S06
S06
 
Introduction to hypothesis testing ppt @ bec doms
Introduction to hypothesis testing ppt @ bec domsIntroduction to hypothesis testing ppt @ bec doms
Introduction to hypothesis testing ppt @ bec doms
 
Chap010.ppt
Chap010.pptChap010.ppt
Chap010.ppt
 
Hypothsis testing
Hypothsis testingHypothsis testing
Hypothsis testing
 
General concept for hypohtesis testing
General concept for hypohtesis testingGeneral concept for hypohtesis testing
General concept for hypohtesis testing
 
More Statistics
More StatisticsMore Statistics
More Statistics
 
Lesson05_new
Lesson05_newLesson05_new
Lesson05_new
 
Telesidang 4 bab_8_9_10stst
Telesidang 4 bab_8_9_10ststTelesidang 4 bab_8_9_10stst
Telesidang 4 bab_8_9_10stst
 
1667390753_Lind Chapter 10-14.pdf
1667390753_Lind Chapter 10-14.pdf1667390753_Lind Chapter 10-14.pdf
1667390753_Lind Chapter 10-14.pdf
 
Lesson05_Static11
Lesson05_Static11Lesson05_Static11
Lesson05_Static11
 
Testing a claim about a mean
Testing a claim about a mean  Testing a claim about a mean
Testing a claim about a mean
 
hypothesisTestPPT.pptx
hypothesisTestPPT.pptxhypothesisTestPPT.pptx
hypothesisTestPPT.pptx
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Statistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docxStatistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docx
 
8. testing of hypothesis for variable &amp; attribute data
8. testing of hypothesis for variable &amp; attribute  data8. testing of hypothesis for variable &amp; attribute  data
8. testing of hypothesis for variable &amp; attribute data
 

Recently uploaded

(8264348440) 🔝 Call Girls In Green Park 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Green Park 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Green Park 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Green Park 🔝 Delhi NCRsoniya singh
 
TDC Health Limited Nigeria Business Plan Opportunity Presentation 2024
TDC Health Limited Nigeria Business Plan Opportunity Presentation 2024TDC Health Limited Nigeria Business Plan Opportunity Presentation 2024
TDC Health Limited Nigeria Business Plan Opportunity Presentation 2024Fikrie Omar
 
(8264348440) 🔝 Call Girls In Sriniwaspuri 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Sriniwaspuri 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Sriniwaspuri 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Sriniwaspuri 🔝 Delhi NCRsoniya singh
 
Delhi Munirka 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex call girl
Delhi Munirka 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex call girlDelhi Munirka 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex call girl
Delhi Munirka 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex call girlsoniya singh
 
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan
 
Guwahati Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Guwahati Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesGuwahati Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Guwahati Call Girls 7001305949 WhatsApp Number 24x7 Best Servicesnajka9823
 
(8264348440) 🔝 Call Girls In Babarpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Babarpur 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Babarpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Babarpur 🔝 Delhi NCRsoniya singh
 
Report about the AHIABGA-UnityNet UNDRIPDay / Earth-Day 2024 Gathering in Mar...
Report about the AHIABGA-UnityNet UNDRIPDay / Earth-Day 2024 Gathering in Mar...Report about the AHIABGA-UnityNet UNDRIPDay / Earth-Day 2024 Gathering in Mar...
Report about the AHIABGA-UnityNet UNDRIPDay / Earth-Day 2024 Gathering in Mar...LHelferty
 
Call Girls At-( Nearby )-Bhikaji Cama Place, Delhi | ⑧③77⓿⑧76⓿7
Call Girls At-( Nearby )-Bhikaji Cama Place, Delhi | ⑧③77⓿⑧76⓿7Call Girls At-( Nearby )-Bhikaji Cama Place, Delhi | ⑧③77⓿⑧76⓿7
Call Girls At-( Nearby )-Bhikaji Cama Place, Delhi | ⑧③77⓿⑧76⓿7dollysharma2066
 
Product Catalog Bandung Home Decor Design Furniture
Product Catalog Bandung Home Decor Design FurnitureProduct Catalog Bandung Home Decor Design Furniture
Product Catalog Bandung Home Decor Design Furniturem3resolve
 
Call Girls in Tilak Nagar (DELHI-) 8377877756 Call Girls Service
Call Girls in Tilak Nagar (DELHI-) 8377877756 Call Girls ServiceCall Girls in Tilak Nagar (DELHI-) 8377877756 Call Girls Service
Call Girls in Tilak Nagar (DELHI-) 8377877756 Call Girls Servicedollysharma2066
 
(8264348440) 🔝 Call Girls In Safdarjung Enclave 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Safdarjung Enclave 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Safdarjung Enclave 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Safdarjung Enclave 🔝 Delhi NCRsoniya singh
 
Model Call Girl in Bawana Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Bawana Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Bawana Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Bawana Delhi reach out to us at 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

Presentation on Paytm mobile application
Presentation on Paytm mobile applicationPresentation on Paytm mobile application
Presentation on Paytm mobile application
 
(8264348440) 🔝 Call Girls In Green Park 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Green Park 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Green Park 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Green Park 🔝 Delhi NCR
 
Cheap Rate ➥8448380779 ▻Call Girls In Sector 56 Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Sector 56 GurgaonCheap Rate ➥8448380779 ▻Call Girls In Sector 56 Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Sector 56 Gurgaon
 
TDC Health Limited Nigeria Business Plan Opportunity Presentation 2024
TDC Health Limited Nigeria Business Plan Opportunity Presentation 2024TDC Health Limited Nigeria Business Plan Opportunity Presentation 2024
TDC Health Limited Nigeria Business Plan Opportunity Presentation 2024
 
Pakistani Jumeirah Call Girls # +971559085003 # Pakistani Call Girls In Jumei...
Pakistani Jumeirah Call Girls # +971559085003 # Pakistani Call Girls In Jumei...Pakistani Jumeirah Call Girls # +971559085003 # Pakistani Call Girls In Jumei...
Pakistani Jumeirah Call Girls # +971559085003 # Pakistani Call Girls In Jumei...
 
(8264348440) 🔝 Call Girls In Sriniwaspuri 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Sriniwaspuri 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Sriniwaspuri 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Sriniwaspuri 🔝 Delhi NCR
 
Delhi Munirka 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex call girl
Delhi Munirka 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex call girlDelhi Munirka 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex call girl
Delhi Munirka 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex call girl
 
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
 
Guwahati Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Guwahati Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesGuwahati Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Guwahati Call Girls 7001305949 WhatsApp Number 24x7 Best Services
 
(8264348440) 🔝 Call Girls In Babarpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Babarpur 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Babarpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Babarpur 🔝 Delhi NCR
 
Report about the AHIABGA-UnityNet UNDRIPDay / Earth-Day 2024 Gathering in Mar...
Report about the AHIABGA-UnityNet UNDRIPDay / Earth-Day 2024 Gathering in Mar...Report about the AHIABGA-UnityNet UNDRIPDay / Earth-Day 2024 Gathering in Mar...
Report about the AHIABGA-UnityNet UNDRIPDay / Earth-Day 2024 Gathering in Mar...
 
young call girls in kailash Nagar, 🔝 9953056974 🔝 escort Service
young call girls in kailash Nagar, 🔝 9953056974 🔝 escort Serviceyoung call girls in kailash Nagar, 🔝 9953056974 🔝 escort Service
young call girls in kailash Nagar, 🔝 9953056974 🔝 escort Service
 
Cheap Rate ➥8448380779 ▻Call Girls In Sector 54 Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Sector 54 GurgaonCheap Rate ➥8448380779 ▻Call Girls In Sector 54 Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Sector 54 Gurgaon
 
Call Girls At-( Nearby )-Bhikaji Cama Place, Delhi | ⑧③77⓿⑧76⓿7
Call Girls At-( Nearby )-Bhikaji Cama Place, Delhi | ⑧③77⓿⑧76⓿7Call Girls At-( Nearby )-Bhikaji Cama Place, Delhi | ⑧③77⓿⑧76⓿7
Call Girls At-( Nearby )-Bhikaji Cama Place, Delhi | ⑧③77⓿⑧76⓿7
 
Hot Sexy call girls in Rajouri Garden🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rajouri Garden🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rajouri Garden🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rajouri Garden🔝 9953056974 🔝 Delhi escort Service
 
Product Catalog Bandung Home Decor Design Furniture
Product Catalog Bandung Home Decor Design FurnitureProduct Catalog Bandung Home Decor Design Furniture
Product Catalog Bandung Home Decor Design Furniture
 
Call Girls in Tilak Nagar (DELHI-) 8377877756 Call Girls Service
Call Girls in Tilak Nagar (DELHI-) 8377877756 Call Girls ServiceCall Girls in Tilak Nagar (DELHI-) 8377877756 Call Girls Service
Call Girls in Tilak Nagar (DELHI-) 8377877756 Call Girls Service
 
Why Powderless DTF Printer is T-shirt Printing Game Changer.pptx
Why Powderless DTF Printer is T-shirt Printing Game Changer.pptxWhy Powderless DTF Printer is T-shirt Printing Game Changer.pptx
Why Powderless DTF Printer is T-shirt Printing Game Changer.pptx
 
(8264348440) 🔝 Call Girls In Safdarjung Enclave 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Safdarjung Enclave 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Safdarjung Enclave 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Safdarjung Enclave 🔝 Delhi NCR
 
Model Call Girl in Bawana Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Bawana Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Bawana Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Bawana Delhi reach out to us at 🔝8264348440🔝
 

Hypothesis Testing techniques in social research.ppt

  • 1. 6. Hypothesis Testing and the Comparison of 2 or More Populations ASW Chapter 9 + Chapter 10
  • 2. 2 A) Introduction  Estimating parameters of population → hypothesis testing on our model. Model or Theory Deductions/Analysis Testable Hypothesis Data Reject Theory Accept Theory (For Now) Modify Theory Empirical Result 1 2 3 4 5 Ch. 1-8, 12, 13 Economic Theory Ch. 9-11, 12, 13 Tests
  • 3. 3 Confidence Intervals and Hypothesis Testing  Confidence intervals → range that μ falls into.  NOW: is μ > 0, or > 1, etc.  OR: is μ1 > μ2?  Testing for specific values of μ.  We have a confidence interval for Saskatchewan female wages by age.  What could we test here?  We will have a confidence interval for Bachelor’s salaries in Saskatchewan.  What could we test here?  Others: gasoline prices? Stock Market fluctuations?
  • 4. 4 B) Developing Null and Alternative Hypotheses  Start with a testable hypothesis.  Point of interest: do older women get paid more?  Economic theory: is 0 < MPC < 1 and constant?  Define it’s opposite:  Older women’s salaries are < average.  MPC is > 1.  One is the Null hypothesis, the other is the Alternative hypothesis.  Use sample data to test the Null hypothesis.  What if it is not that simple to have 2 opposites?
  • 5. 5 Which is the Null?  General rule: the hypothesis with the = sign or the < or the > sign is the Null.  OR: the Null is something we assume is true unless contradicted by the sample.
  • 6. 6 1. Research hypotheses:  Testing an exception to the general rule, so it goes in the alternative.  E.g, testing if older women’s salaries (μ) > average: H0: μ < μ(average) HA: μ > μ(average)  Results will tell us either:  If testing shows H0 cannot be rejected (“accepted”) → implies that older women’s salaries are not higher, but we cannot be sure.  If testing shows H0 can be rejected → we can infer HA is true, μ > μ(average).
  • 7. 7 2. Testing the Validity of a Claim  Assume claim is true until disproven.  E.G.: manufacturer’s claim of weight/container. H0: μ > 100 grams. HA: μ < 100 grams.  Results will tell us either:  If testing shows H0 cannot be rejected (“accepted”) → manufacturers claim not challenged.  If testing shows H0 can be rejected → we can infer manufacturer is lying.
  • 8. 8 3. Testing in Decision-Making  Here, if either too high or too low, need to do something.  E.G.: is class length 75 minutes? H0: μ = 75 minutes. HA: μ ≠ 75 minutes.  If H0 not rejected (accepted), no change in behaviour.  If H0 rejected –> change behaviour.
  • 9. 9 C) Type I and Type II Errors  Sample data → could have errors.
  • 10. 10 Type I and Type II Errors Correct Decision Type II Error Correct Decision Type I Error Reject H0 Accept H0 H0 True H0 False Conclusion Population Condition False Negative False Positive
  • 11. 11 False Positive or False Negative? New claims over bungled shooting of Brazilian By Mark Sellman, Times Online, and Daniel McGrory U.K. police defend shoot-to-kill after mistake … Blair said Menezes had emerged from an apartment block in south London that had been under surveillance in connection with Thursday’s attacks, and refused police orders to halt. Menezes had also been wearing an unseasonably heavy coat, further raising police suspicions. MSNBC, July 24th.
  • 12. 12 Other Type I and Type II Errors  Sampling songs.  Health tests.  Pregnancy tests.  Jury decisions.
  • 13. 13 Level of Significance  Hypothesis testing is really designed to control the chance of a Type I error.  Probability of Type I error = the level of significance.  Selecting  (= level of significance )  select probability of Type I error.  What is the level of significance for Jury trials?  We do not control for Type II errors –> except by our language of stating “do not reject H0”.
  • 14. 14 Level of Significance cont’d   is picked by researcher –> normally 5%?   = 5% → type I error happens only 5% of the time.
  • 15. 15 D) The probability value (p-value) approach 1. Develop null and alternative hypothesis. 2. Select level of significance . 3. Collect data, calculate sample mean and test statistic. 4. Use test statistic to calculate p-value. 5. Compare: reject H0 if p-value < .  The sample implies that the alternative (your research hypothesis) is true. p-value approach
  • 16. 16 Hypothesis Testing: The Critical Value Approach 4. Use  to determine critical value and rejection rule. 5. Compare: if |test statistic| > |critical value|, reject H0.  The sample implies that the alternative (your research hypothesis) is true. Critical-value approach 1. Develop null and alternative hypothesis. 2. Select level of significance . 3. Collect data, calculate sample mean and test statistic.
  • 17. 17 Hypothesis Testing cont’d…  This is essentially inverting our confidence index. → Is more than 2 standard deviations away from some benchmark?
  • 18. 18 E) Population Mean, σ Known, One-Tailed Test  Same hypothesis  p-value method and critical value method.  Example: a new employment program initiative has been introduced to reduce time spent being unemployed.  Goal: 12 weeks or less unemployed.  Population standard deviation believed to be 3.2 weeks.  Sample of 40 unemployed workers, average time unemployed 13.25 weeks.  Assuming a level of significance () of .05, is the program goal being met?
  • 19. 19 First (Common) Steps  Hypothesis: H0: μ < 12 HA: μ > 12  Clearly 13.25 > 12.  This casts doubt on our program goal (the null), and whether we should continue it.  Key: is it enough more, given sample size and standard deviation, or is it just a (small) random fluctuation?
  • 20. 20 Computing the Test Statistic  Under our assumptions: use the standard normal.  Use sample mean to calculate test statistic        13.25 12 2.47 / 3.2/ 40 x z n  Is this z big enough to reject the null hypothesis?  Next, go our two routes: Calculate p-value OR z-critical.
  • 21. 21 Calculating the p-value  Given the z-value, what is the corresponding probability? 0 Z=2.47 z p=??  This is the probability that 13.25 > 12 by chance.
  • 22. 22 Calculating the p-value cont’d  Find 2.47 on the Standard Normal Distribution tables: z .00 .01 .02 .03 .04 .05 .06 .07 .08 .09 … 2.3 2.4 .4918 .4920 .4922 .4925 .4927 .4929 .4931 .4932 .4934 .4936 2.5 …
  • 23. 23 Calculating the p-value cont’d  .4932 is the probability of being between 0 and z=2.47.  p = 0.5 – 0.4932 = 0.0038. 0 Z=2.47 z 0.4932
  • 24. 24 Should We Reject the Hypothesis?  This says that the probability of getting a sample mean of 13.25 when the true mean is 12 = .0038 or less than ½ of 1 percent.  Our significance level was only 5%, so we reject the null.  We are 99.62% certain that the program has failed.
  • 25. 25 Rejection of the Null 0 Z=2.47 z 0.0038 Z.05 Sometimes we say: “significant at the 0.38% level”.
  • 26. 26 Critical Value Approach  This is an alternative you often see in textbooks or articles.  Find the value of z.05, and compare it to the test value of z (2.47).  From the tables, z.05 = 1.645.  Because 2.47 > 1.645, reject H0.
  • 28. 28 Excel  Let’s do this example in Excel.  Look at Appendix 9.2 in text, especially Figure 9.8
  • 29. 29 F) Population Mean, σ Known, Two-Tailed Test  Null: μ = μ0 → Alternative is μ ≠ μ0.  Must examine two areas of the distribution.  Example:  Price/earnings ratios for stocks.  Theory: stable rate of P/E in market = 13. If P/E (market) < 13, you should invest in the stock market. If P/E (market) > 13, you should take your money out.
  • 30. 30 Estimate Steps  Can we estimate if the population P/E is 13 or not?  Common steps:  Set hypothesis: H0: μ = 13 HA: μ ≠ 13  Select  = .05.  Calculate standard error.  Calculate z-value.
  • 31. 31 Calculating Test Statistic  We have a sample of 50  = 12.1.  Historical σ = 3.0456. 4307 . 0 50 0456 . 3 Error Standard x    n   0896 . 2 4307 . 0 13 1 . 12 - x value x 0         z
  • 32. 32 p-value Approach  Calculate the p-value.  We will calculate for the lower tail → then make an adjustment for the upper tail.
  • 33. 33 p-value, Two-Tailed Test 0 Z=2.09 z Z=–2.09 p(z < –2.09) = ?? p(z > 2.09) = ?? We can just calculate one value, and double it.
  • 34. 34 Calculating the p-value cont’d  Find 2.090 on the Standard Normal Distribution tables: z .00 .01 .02 .03 .04 .05 .06 .07 .08 .09 … 1.9 2.0 .4772 .4778 .4783 .4788 .4793 .4798 .4803 .4808 .4812 .4817 2.1 …
  • 35. 35 p-value, Two-Tailed Test 0 Z=2.09 z Z=–2.09 p(z < –2.09) = ?? p(z > 2.09) = 0.5 -.4817 = 0.0183 Doubling the value, we find the p-value = 0.0366 0.4817
  • 36. 36 Should We Reject the Null Hypothesis?  Yes!  p-value = 0.0366 <  = 0.05.  There is only a 3.66% chance that the measured price/earnings ratio sample mean of 12.1 is not equal to the stable rate of 13 by random chance.
  • 37. 37 Critical Value Approach  Reject the null hypothesis if: test z-value > critical value or if test z-value < critical value  Two tailed test:  = 0.05 → need critical value for /2 = 0.025.  The tables tell us that this is 1.96.
  • 38. 38 G) Population Mean, σ Unknown  σ unknown → must estimate it with our sample too → use t-distribution, n – 1 degrees of freedom. n s  x Error Standard  x 0 - x value     t
  • 39. 39 One-tailed Test, p-value Approach  Steps: 1. Set up hypothesis. 2. Decide on level of significance () 3. Collect data, calculate sample mean and test statistic. 4. Use test statistic & t-table/Excel to calculate p- value. 5. Compare: reject H0 if p-value < .
  • 40. 40 The RCMP periodically samples vehicle speeds at various locations on a particular roadway. The sample of vehicle speeds is used to test the hypothesis Example: Highway Patrol The locations where H0 is rejected are deemed the best locations for radar traps. H0:  < 65
  • 41. 41 Example: Highway Patrol Outside Lumsden: A sample of 64 vehicles –> average speed = 65.5 mph –> standard deviation = 4.2 mph. Use  = .05 to test the hypothesis.
  • 42. 42 Common to Both Approaches 1. Determine the hypotheses. 2. Specify the level of significance. 3. Compute the value of the test statistic.  = .05 H0:  < 65 Ha:  > 65 9524 . 64 / 2 . 4 65 5 . 65 - x value x 0        t
  • 43. 43 4. Estimate the p-value From t-Distribution Table  Must “interpolate” the value of t = 0.9524, df = 65 Degrees of Freedom Area in Upper Tail 0.20 0.10 0.05 0.025 0.01 0.005 1 … 50 .849 1.299 1.676 2.009 2.403 2.678 60 .848 1.296 1.671 2.000 2.390 2.660 80 .846 1.292 1.664 1.990 2.374 2.639 … 0.9524 .10 < p–value < .20
  • 44. 44 p –Value Approach 5. Determine whether to reject H0. Because p–value >  = .05, we do NOT reject H0. We are at least 95% confident that the mean speed of vehicles outside Lumsden is LESS than OR EQUAL TO 65 mph.
  • 45. 45 5. Determine whether to reject H0. Because 0.9524 < 1.669, we do NOT reject H0. Critical Value Approach For  = .05 and d.f. = 64 – 1 = 63, t.05 = 1.669 4. Determine the critical value and rejection rule. Reject H0 if t > 1.669
  • 46. 46 H) Introduction: Comparing Population Differences  Do men get paid more than women?  $46,452 for men vs. $35,122 for women (bachelors).  Do more 100-level Economics courses help you in Econ 201?  Has the crime rate risen?  Are there more hurricanes recently?
  • 47. 47 Key point: the role of standard deviation 1 x 2 x 1 x 2 x Probably the same Probably different
  • 48. 48 Comparing 2 Populations  True population means: 1 and 2.  Random sample of n1 –> 1.  Versus random sample of n2 –> 2.  Transform into problem: is 1 – 2 = 0?  Assuming 1 and 2 known –> use z-test.  If unknown –> estimate ’s from sample s’s, and use t-test.
  • 49. 49 I) Confidence Intervals, 2 Means: ’s Unknown  How important is an extra introductory course in determining your grade in Economics 201?  Data:  Natural experiment.  59 students.  43 had only one 10x course.  16 had two 10x courses.  Final exam grades:  One 10x: average = 61.69%, s1 = 22.65, n1 = 43.  Two 10x: average = 75.11%, s2 = 12.80, n2 = 16.
  • 50. 50 Confidence Interval Estimation  Point estimator: 1 – 2.  Standard error of 1 – 2 is: 2 2 2 1 2 1 2 1 n s n s x x    
  • 51. 51 Confidence Interval cont’d  Confidence interval of difference in means: 1 – 2 + Margin of Error  Typically use α = 0.05.  Margin of error: 2 2 2 1 2 1 2 / 2 1 n s n s t x x    
  • 52. 52 Degrees of Freedom  One UGLY formula: 2 2 2 1 2 1 2 2 2 2 2 1 2 1 1 2 2 1 1 1 1 s s n n df s s n n n n                         In this example: df = 47.36 → round down to 47.  95% confidence interval → t0.025.  For 47 degrees of freedom, table says: 2.012.
  • 53. 53 Confidence Interval cont’d. or 2 2 2 1 2 1 2 / 2 1 n s n s t x x     or 16 79 . 163 43 17 . 513 012 . 2 11 . 75 86 . 61   
  • 55. 55 Confidence Interval  We are 95% confident that students with only one 10x course scored between 3.775% and 22.725% lower than students with two 10x courses.  Next step would be: why, how??
  • 56. 56 J) Hypothesis Tests, 2 Means: ’s Unknown  Two datasets –> is the mean value of one larger than the other?  Is it larger by a specific amount?  μ1 vs. μ2 –> μ1 – μ2 vs. D0.  Often set D0 = 0 –> is μ1 = μ2?
  • 57. 57 Example: Female vs. Male Salaries  Saskatchewan 2001 Census data: - only Bachelor’s degrees - aged 21-64 - work full-time - not in school  Men: M = $46,452.48, sM = 36,260.1, nM = 557.  Women: W = $35,121.94, sW = 20,571.3, nW = 534.  M – W = $11,330.44 } our point estimate.  Is this an artifact of the sample, or do men make significantly more than women?
  • 58. 58 Hypothesis, Significance Level, Test Statistic  We will now ONLY use the p-value approach, and NOT the critical value approach.  Research hypothesis: men get paid more: 1. H0: μM – μW < 0 H1: μM – μW > 0 2. Select  = 0.05 3. Compute test t-statistic: 375 . 6 534 426178351 557 1314794928 0 ) 94 . 35121 48 . 46452 ( ) ( 2 2 0          W W M M W M n s n s D x x t
  • 59. 59 4. a. Compute the Degrees of Freedom  Can compute by hand, or get from Excel: 2 2 2 1 2 1 2 2 2 2 2 1 2 1 1 2 2 1 1 1 1 s s n n df s s n n n n                        = 888
  • 60. 60 4. b. Computing the p-value Degrees of Freedom 0.20 0.10 0.02 0.025 0.01 0.005 … 100 .845 1.290 1.660 1.984 2.364 2.626  .842 1.282 1.645 1.960 2.326 2.576 6.375 up here somewhere The p-value <<< 0.005.
  • 61. 61 5. Check the Hypothesis  Since the p-value is <<< 0.05, we reject H0.  We conclude that we can accept the alternative hypothesis that men get paid more than women at a very high level of confidence (greater than 99%).
  • 62. 62 Excel t-Test: Two-Sample Assuming Unequal Variances Male Female Mean 46452.47935 35121.94195 Variance 1314794928 423178351.3 Observations 557 534 Hypothesized Mean Diff. 0 df 888 t Stat 6.381034789 P(T<=t) one-tail 1.41441E-10 .00000000014 t Critical one-tail 1.646571945 P(T<=t) two-tail 2.82883E-10 t Critical two-tail 1.962639544
  • 63. 63 Summary  Hypothesis tests on comparing two populations.  Convert to a comparison of the difference to a standard.  More complex standard deviation and degrees of freedom.  Same methodology as comparing other hypothesis tests.
  • 64. 64 K) Statistical vs. Practical Significance  Our tests: statistically significantly  Real world interest:practical significance.  Men vs. women: the difference is statistically significant AND practically: $46,452.48 vs $35,121.94  Saskatchewan, full-time, Bachelor’s: Women make only 75.6% of men, same average education level.
  • 66. 66 L) Matched Samples  Controlled experiment –> match individuals in each group.  Matched samples –> each individual tries each method in turn.  Variation between samples not a problem.  Focus on difference data.  Independent samples –> the norm in economics.  Regression analysis.
  • 67. 67 M) Introduction to ANOVA  What if we want to compare 3 or more sample means (treatment means)?  Example: total income, Saskatchewan females employed full-time and full-year, by age, 2003 (Source: See Oct. 8th lectures) Age group Income in thousands of dollars Sample size Mean Standard deviation 25-34 33.3 13.5 55 35-44 40.3 20.7 57 45-54 45.1 25.9 37 55-64 40.1 25.9 31 Overall weighted average = 38.2
  • 68. 68 ANOVA’s Hypotheses 4 different populations. equal are means population all Not : : 4 3 2 1 0 A H H        There is one true population mean and 4 sample variations.
  • 69. 69 N) Steps of ANOVA 1. Set up the Hypothesis Statements H0: μ1 = μ2 = μ3 = μ4 = … = μk HA: Not all population means are equal 2. Collect your sample data: Means: 1, 2, 3, 4, … k Variances:s2 1, s2 2, s2 3, s2 4 ,… s2 k Sample Sizes: n1, n2, n3, n4,… nk
  • 70. 70 Steps of ANOVA Continued 4. Calculate the overall average: k k k n n n n x n x n x n x n x          ... ... 3 2 1 3 3 2 2 1 1 5. Create our two estimates of 2.
  • 71. 71 Step 5 a) Estimating 2 via SSTR  Between-treatments estimate of 2 or sum of squares due to treatments (SSTR).  This compares to , and constructs an estimate of 2 based on the assumption the Null Hypothesis is true: 2 2 2 2 2 1 1 1 2 ) ( ... ) ( ) ( ) ( SSTR x x n x x n x x n x x n k k k j j j            s xj ' x
  • 72. 72 Step 5 b) Estimating 2 via SSE  Within-treatments estimate of 2 or the sum of squares due to error (SSE).  This takes the weighted average of the sample sj 2 as an estimate of 2 and is a good estimate regardless of whether the Null is true: 2 2 2 2 2 1 1 1 2 ) 1 ( ... ) 1 ( ) 1 ( ) 1 ( SSE k k k j j j s n s n s n s n           
  • 73. 73 Step 6: Testing The Null  If Null true, both estimates should be similar, and SSTR ≈ 1. SST  If ratio >>> 1  reject the Null, accept the Alternative that there is multiple population distributions.
  • 74. 74 Steps of ANOVA 1. Set up the Hypothesis Statement. (Null: all means are equal) 2. Collect the sample data. 3. Select level of significance –> α = 0.05. 4. Calculate the overall average. 5. a) Estimate 2 via sum of squares due to treatments (SSTR). b) estimate of 2 via sum of squares due to error (SSE). 6. If Null true, both estimates should be similar, and STR ≈ 1. SST
  • 75. 75 MSTR and MSE  MSTR = sum of squares due to treatment numerator degrees of freedom = sum of squares due to treatment no. of treatments – 1 = SSTR k-1  MSE = Sum of squares due to error denominator degrees of freedom = Sum of squares due to error total no. of obs. – no. of treatments = SSE nT – k df1 df2
  • 76. 76 F-test  F-statistic = MSTR  k-1 degrees of freedom (df1) MSE  nT – k degrees of freedom (df2)  If H0 is true, MSTR ≈ MSE → F-statistic ≈ 1.  If H0 is false → p-value is < level of significance (α). → F-statistic is higher than critical value from the table/Excel.
  • 78. 78 O) Saskatchewan Female Wages Example  Example: total income, Saskatchewan females employed full-time and full-year, by age, 2003 (Source: See Oct. 8th lectures) Age Group Mean Income Variance = (St. Dev.)2 Sample Size 25-34 33.3 (13.5)2 = 182.25 55 35-44 40.3 (20.7)2 = 428.49 57 45-54 45.1 (25.9)2 = 670.81 37 55-64 40.1 (25.9)2 = 670.81 31 Overall weighted average = 38.2
  • 79. 79 Calculating the MSTR, MSE 5 . 1148 3 / 4 . 3445 ) 1 /( 4 . 3445 ) 2 . 38 1 . 40 ( 31 ) 2 . 38 1 . 45 ( 37 ) 2 . 38 3 . 40 ( 57 ) 2 . 38 3 . 33 ( 55 ) ( ) ( ) ( ) ( ) ( SSTR 2 2 2 2 2 4 4 2 3 3 2 2 2 2 1 1 1 2                          k SSTR MSTR x x n x x n x x n x x n x x n k j j j 8 . 443 ) 4 180 /( 4 . 78110 ) /( 4 . 78110 81 . 670 * 30 81 . 670 * 36 49 . 428 * 56 25 . 182 * 54 ) 1 ( ) 1 ( ) 1 ( ) 1 ( ) 1 ( SSE 2 4 4 2 3 3 2 2 2 2 1 1 1 2                       k N SSE MSE s n s n s n s n s n T k j j j
  • 80. 80 Calculating F-Stat and p-value Ftest-value = MSTR = 1148.5 = 2.59 MSE 443.8 MSE MSTR  F 0 2.59 ? value - P 
  • 81. 81 F-Table for df1 = 3 and df2 = 176 Denomina- tor degrees of freedom (df2) (MSE) Area in Upper Tail Numerator degrees of freedom (df1) (MSTR) 2 3 4 100 .10 .05 .025 .01 … 2.14 2.70 3.25 3.98 1000 .10 .05 .025 .01 … 2.09 2.61 3.13 3.80 Clearly the p-value > 0.05 –> accept the Null of one distribution 176 degrees of freedom, F=2.59 in here.
  • 82. 82 Excel F-test formula  =FDIST(F-value, df1, df2) –> yields value of .0544. MSE MSTR  F 0 2.59 0.0544 value - P 
  • 83. 83 P) Econometrics for Dummies…  Instead of ANOVA, economists tend to use Regression analysis + “dummy” variables.  Gives us the direction and size of the differences in mean values.  But ANOVA is a useful first step.