You are on page 1of 10

03/03/2018

WHAT IS STATISTICAL HYPOTHESIS?


STATISTICS FOR ECONOMIST • A statistical hypothesis is an assertion or conjecture about a
population parameter or parameters such as the mean, standard
deviation and the variance of a population.
HYPOTHESIS TESTING • Hypotheses in statistics always cOme in pairs
- Null hypothesis, (expresses no difference between a
parameter)
- Alternative hypothesis, (accepted when the null hypothesis is
rejected)

3/3/2018 2

TYPES OF HYPOTHESIS HYPOTHESIS TESTING


• Three main types of hypothesis. • In hypothesis testing, a specific idea concerning a parameter is
• Consider the population parameter – the mean –μ and the available before the study and the purpose of the test is to
hypothesized value of the population mean -μo. Below are the conduct an experiment by collecting data to confirm, or otherwise
three main types of hypothesis: reject this idea
• Null hypothesis is valuated for reasonableness based on sample
: ≥ : ≤ : = evidence.
3 - If it is not reasonable, it is rejected.
: < : > : ≠ - If it is reasonable or the observed difference is not significance,
then we do not reject it
3/3/2018 3/3/2018 4

TYPE I AND II ERRORS TYPE I AND II ERRORS contd


• If the null hypothesis is true and rejected or false and • Type II error: When the null hypothesis is false and accepted
accepted, the decision is in either case an error. • The probability of committing a type II error it is designated by β
(Beta
• Type I error : If the null hypothesis is true and rejected then ;
probability of committing a type one error is designated by α
(Alpha).
• If a hypothesis is rejected at a 5 percent (α) level of
significance, then we are 95% confident that we have made
the right decision
3/3/2018 5 3/3/2018 6

1
03/03/2018

TYPE I AND II ERRORS contd STEPS IN HYPOTHESIS TESTING

ACCEPT REJECT 1. Formulate the null and alternative hypothesis


2. Set the value of outcomes (the level of
is true Correct Decision Type I Error significance)
3. Choose the appropriate test statistics (Z, t, , F)
is false Type II Error Correct Decision and calculate from the sample, the empirical value
of the chosen statistics

3/3/2018 7 3/3/2018 8

STEPS IN HYPOTHESIS TESTING contd Two-sided or two-tailed test.


4. Construct the decision rule and find the critical values • If the decision rule lies within an interval and we reject
of the chosen statistics the null hypothesis for values outside this interval, we
refer to such criterion as a two-sided test or a two-
5. Compare the empirical values of the test statistics tailed test.
from the sample to the critical values and make the • For example if we are required to test the hypothesis
decision to either reject Ho or not : = 42 and the decision rule says “ accept if
the sample mean lies within the interval 40.1 and 45.5
3/3/2018 9 (i.e.40.1 ≤ ≤ 45.5 ) then the situation is a 2 tailed
3/3/2018 10

test.

One-sided or one-tailed test TEST FOR THE MEAN-TEST STATISTICS


• If we reject the null hypothesis for values of the mean-
greater than or less then a certain value, we refer to the
criterion as a one-sided test or one-tailed test If the sample size is large, ̅−
that is ≥ =
• Example if : ≥ 42 and the decision rule state that accept √
if the sampled mean is greater than 43 (i.e. ≥ 43 ). Then If the sample size is small, ̅
we reject if the mean is less than 43 ( < 43), then we that is < 30
t=
have a one-sided test. √

3/3/2018 11 3/3/2018 12

2
03/03/2018

TEST COMPARING TWO MEANS (PAIRED


TEST COMPARING TWO MEANS (PAIRED DATA)
DATA)contd
• Sometimes we would like to know whether an observed difference • Assume we have two independent samples with
between two means is by chance or whether it is statistically significance
means ̅ and ̅ respective sample sizes and
• Suppose x1, x2, ….xn are the observations on n individuals before an
experiment and y1, y2, ……yn are the corresponding observation after the from a normal population with mean and and
experiment. Then (x1,y1), (x2,y2),……(xn,yn) constitute a paired data. variance and .
• To compare the means of these data, we can transform the data into a
single sample data by finding the different between corresponding
We can compare the means and by testing the
observations, and reducing it to a one-sample test. hypotheses under various conditions about the
• population variance and sample size
3/3/2018 13 •:
3/3/2018 14

TEST COMPARING TWO MEANS –HYPOTHESIS CASE 1: POPULATION VARIANCES ARE KNOWN
: ≥ or : − ≥ • If the sample sizes are large, i.e ≥ and ≥ and
the variances are known, then the test statistics for the
: < : − < difference between two means is given by :
̅ ̅
: ≤ or : − ≤0
• = This is the z statistics

: > : − >0
: = or : − = • where = − the value on the right hand side of the null
hypothesis , which is usually zero
3/3/2018 : ≠ : − ≠0 15 3/3/2018 16

CASE 2: VARIANCES ARE UNKNOWN BUT n IS CASE 3A: VARIANCES ARE UNKNOWN BUT n IS
LARGE SMALL(n less than 30)
• If the population variances are unknown but the sample size is If the variances are equal that = = , then the test
large, then the sample variance can be used as an approximate statistics is:
substitute for the population variance. That is:
̅ ̅
̅ ̅ • =
• = ( )

• which is the t distribution with + − 2 degrees of


• where = − freedom
3/3/2018 17 3/3/2018 18

3
03/03/2018

CASE 3B: VARIANCES ARE UNKNOWN BUT n IS


DECISION RULE
SMALL(n less than 30)
If no assumption of equality of the variances is made then
∗ ̅ ̅
the test statistic =

• where t* is approximately the t-distribution with f degrees

where =
3/3/2018 19 3/3/2018 20

EXAMPLE 1 SOLUTION
• A study by the EPA compared the highway fuel economy of • We solve the problem using the steps in testing for hypothesis
domestic and imported private cars. A test of 35 domestic 1. Formulate the null and alternative hypothesis:
cars resulted in an average of 35.2 meter/gallon, and a test of : − =0
40 imported cars resulted in an average of 34.2 meter/gallon. : − ≠0
The population gas mileage is known to be normal in both 2. Set the value of outcomes (the level of significance) : α=0.05
cases with a variances of = 2.3 (domestic) and = 1.8 3. Choose the appropriate test statistics and calculate the
(imported). Test the hypothesis that the population means empirical value of the statistics.
are equal at α=0.05
3/3/2018 21 3/3/2018 22

SOLUTION SOLUTION
• This is a test of the differences between two means and the sample 4. . Construct the decision rule and find the critical values of the
size is greater than 30. Also, the population variances are known. chosen statistics
Therefore the test statistics is the Z If < − ⁄ or > ⁄ reject otherwise accept
• ̅ = 35.2 ̅ = 34.2 = 2.3 , = 1.8, = 35, = 40 ± . , ± 1.96
̅ ̅ 5. Compare the empirical values of the test statistics with the
• = = 3.011 critical values and conclude
Calculated Z=3.01 > ⁄ = 1.96 .
By the decision rule, we reject the null hypothesis and conclude
3/3/2018 23
that that the population means are not equal
3/3/2018 24

4
03/03/2018

EXAMPLE 2 SOLUTION
• In 1994 Duraplast claimed that its PVC pipes are more durable 1. Formulate the null and alternative hypothesis.
than that of Interplast. In order to test this claim a student made Thus, the null and alternative hypotheses to be tested are:
an experiment by testing the durability of 5 PVC pipes from each : − ≤0
company. Hisr experiment revealed that the mean duration of a
Duraplast PVC is 20,000 months and that of Interplast is 8,000 : − >0
months. The standard deviation of the PVCs from Duraplast and
Interplast were 3,000 and 2,000 month respectively. Test this 2. Set the value of outcomes (the level of significance) : α=0.05
claim using an of 0.05 if the population variances of the
duration of the two PVCs are equal
3/3/2018 25 3/3/2018 26

SOLUTION SOLUTION
3. Choose the appropriate test statistics and calculate the 4. Construct the decision rule and find the critical values of the chosen
empirical value of the statistics statistics
The test statistic is the t-statistics (when the variances are equal) > , reject or reserve judgment; . , = 1.86
̅ − ̅ − 5. Compare the empirical values of the test statistics with the critical
= = 7.44
values and conclude
−1 + ( − 1) 1 1
∗ + = 7.44 > . , = 1.86
+ −2
Hence we reject the null hypothesis that the mean duration of
Duraplast PVC is not less than or equal to that of Interplast
3/3/2018 27 3/3/2018 28

QUESTION SOLUTION
• An advert in the Ghanaian Times provide the following prices for 1. Formulate the null and alternative hypothesis.
renting a car from two different companies in 26 towns. Determine : − =0 : − ≠0
if the two sample means differ significantly, using = 0.1
City
A B C D E F G H I J K L M 2. Set the value of outcomes (the level of significance) : α=0.1
Company 1
46 61 59 55 54 52 34 50 49 46 41 54 68
Company 2
46 57 58 54 54 52 34 49 49 46 41 50 63
3. Choose the appropriate test statistics and calculate the empirical
N O P Q R S T U V W X Y Z value of the statistics
City

Company 1
68 65 44 57 45 56 50 50 47 48 47 62 45
Company 2
3/3/2018 63 61 44 53 45 52 50 50 47 48 47 59 45
29 3/3/2018 30

5
03/03/2018

SOLUTION SOLUTION
• The sample size is small and the sample standard deviation is known, 4. Construct the decision rule and find the critical values of the
nothing is said about the equality of the population variance and chosen statistics
therefore we use the t-statistics for the difference in mean when the If < − ⁄ or > ⁄ reject or reserve judgment.
variances are not equal.
̅ − ̅ −
= 0.68 5. Compare the empirical values of the test statistics with the
−1 + ( − 1) 1 1 critical values and conclude
+ −2 ∗ +
. , ⋍ . , = 2.01 > = 0.68
Therefore accept
3/3/2018 31 3/3/2018 32

QUESTION SOLUTION
• Zulu Obaapanyin - Ama Ansomaah believes that the average cost of 1. Formulate the null and alternative hypothesis.
housing in a certain suburb has gone up more than ¢15,000 over the : − ≤ 15000 : − > 15000
last ten years. She believes that the standard deviation of the cost of
single-family dwelling 10 years ago was ¢4,000, but that is currently
¢8,000. In checking a random sample of old records she has found that 2. Set the value of outcomes (the level of significance) : α=0.05
30 houses in this suburb 10 years ago sold for an average of ¢22,875.
Furthermore, a random sample of 25 houses in this suburb sold this 3. Choose the appropriate test statistics and calculate the empirical
year for an average of 40,345. Is her belief about the increase in the value of the statistics
cost of housing supported by data? Assume the distribution is normal ̅ = 40,345 ̅ = 22,875 = 4000 = 8000 =
at an alpha of 0.05.
3/3/2018 33 25 = 30
3/3/2018 34

SOLUTION SOLUTION
̅ ̅ , , , 5. Compare the empirical values of the test statistics with the
• = = = 1.404 critical values and conclude . = 1.404 > . = 1.645.
( ) ( )
We accept Ho

4. Construct the decision rule and find the critical values of


the chosen statistics
Reject if Z > . = 1.645
3/3/2018 35 3/3/2018 36

6
03/03/2018

TESTING CONCERNING STANDARD DEVIATIONS TEST STATISTICS


• The chi-square distribution is used to test whether the • If our sample is random and comes from a normal population
population standard deviation is equal to a specific constant or then =
( )
with (n-1) degrees of freedom is the test
whether the population variance equals to a specific constant.
statistics.
• The critical values are and for one sided alternatives
• : ≥ : ≤ : =
and, ⁄ and ⁄ for two sided alternative.
: < : > : ≠

• The test criteria for the null hypothesis = are as


follows:
3/3/2018 37 3/3/2018 38

DECISION RULE EXAMPLE 1


• In a laboratory experiment, = 0.0086 for 10 determination
of specific heat of iron. Use the 0.05 level of significance to test
the null hypothesis against the alternative hypothesis
< 0.01

3/3/2018 39 3/3/2018 40

SOLUTION SOLUTION
1. Formulate the null and alternative hypothesis. • This is a test of the standard deviation being equal to a specific
: ≥ 0.01 , : < 0.01 constant and therefore the chi squared test is used
( ) ( . )
• = = ( . )
= 6.7
2. Set the value of outcomes (the level of significance) : α=0.05
4. Construct the decision rule and find the critical values of the
chosen statistics
3. Choose the appropriate test statistics and calculate the
Reject the null hypothesis if χ2< χ2 0.95,9 = 3.325 otherwise accept
empirical value of the statistics
Ho or reserve judgment.

3/3/2018 41 3/3/2018 42

7
03/03/2018

SOLUTION QUESTION
5. Compare the empirical values of the test statistics with the A student in an attempt to check a Professor’s claim that convicted
critical values and conclude embezzlers spend on the average 12.3 months in jail takes a random
sample of 35 such cases from court files.
• χ2=6.7> χ2 0.95,9 = 3.325 hence accept Ho or reserve judgement. • Using his results, ̅ = 11.5 ℎ = 3.8 months and the
level of significance is 0.05. Should the student accept the null
hypothesis = 12.3 months or the alternate hypothesis ≠
• The standard deviation is less than 0.0100 12.3months?
• Test at 0.01 level of significance whether or not = 4.2 months for
the amount of time that convicted embezzlers spend in jail if n=41.
3/3/2018 43 That is test if = 4.2 even though s=3.8.
3/3/2018 44

SOLUTION (a) SOLUTION


1. Formulate the null and alternative hypothesis. • The sample size is large n>30 and therefore the z test will be
: = 12.3 : ≠ 12.3 used n=35, s=3.8,
̅ ̅
• = or =
2. Set the value of outcomes (the level of significance) : α=0.05 √ √

3. Choose the appropriate test statistics and calculate the empirical


. .
value of the statistics • = . = −1.25

3/3/2018 45 3/3/2018 46

SOLUTION SOLUTION (b)


4. Construct the decision rule and find the critical values of the • Formulate the null and alternative hypothesis.
chosen statistics : = 4.2 : ≠ 4.2
If Z < − ⁄ or Z > ⁄ reject Ho
• Set the value of outcomes (the level of significance) : α=0.01
5. Compare the empirical values of the test statistics with the critical
values and conclude • Choose the appropriate test statistics and calculate the
⁄ = . = 0.0987 ; Z= -1.25< − ⁄ = − . = −0.0987 empirical value of the statistics
We reject Ho, the professor’s claim is not correct
3/3/2018 47 3/3/2018 48

8
03/03/2018

SOLUTION (b) SOLUTION (b)


• Equality of standard deviation and therefore the χ2 Test. n=41, • 5. Compare the empirical values of the test statistics with the
s=3.8, critical values and conclude
( ) ( . ) • 32.74 > 20.7065 and 32.74 < 66.7659= χ0.005
• = = = 32.74
( . )
4. Construct the decision rule and find the critical values of the • This implies that 20.7065 < 32.74 < 66.7659
chosen statistics
if < ⁄ or > ⁄ reject Ho otherwise accept Ho or • Accept Ho or reserve judgment. The amount of time
reserve judgment; Χ0.005,40=66.7659 χ0.995,40=20.7065 embezzlers stay in jail has got a standard deviation of 4.2.
3/3/2018 49 3/3/2018 50

TEST FOR THE EQUALITY OF TWO VARIANCES –


TEST CRITERIA , F-TEST
F-test
• The sampling distribution for inferences about the equality of two
variances is described by the F distribution. The F-test is used to test
the equality of 2 independent variance or standard deviation
• The criteria for testing the null hypothesis
• ∶ = , ∶ =

3/3/2018 51 3/3/2018 52

EXAMPLE SOLUTION
• In a sample of 8 observations, the sum of squared deviations of 1. Formulate the null and alternative hypothesis
item from the mean was 94.5. In another sample of 10 ∶ = , ∶ ≠
observations, the value was found to be 101.7. Test whether
the difference is significant at 5% level.
2. Set the value of outcomes (the level of significance): : 0.05

3. Choose the appropriate test statistics and calculate the


empirical value of the statistics

3/3/2018 53 3/3/2018 54

9
03/03/2018

SOLUTION SOLUTION
• The test statistic is the F- statistic because we are talking about the , we accept Ho or reserve judgment.
4. Construct the decision rule and find the critical values of the
equality of standard deviations. But we need to calculate the chosen statistics
standard deviation first.
• If F > ⁄ < ⁄ or reject Ho otherwise accept Ho.
• ∑( − ̅ ) = 94.5 ; ∑( − ̅ ) = 101.7 ; =8; = 10 Where F is the larger of the two ratios
5. Compare the empirical values of the test statistics with the
∑( ̅ ) . ∑( ̅ ) . critical values and conclude
• = = = 13.5, = = = 11.3

∗ .
• = = .
= 1.195; . , . = 4.2
3/3/2018 55 3/3/2018 56

SOLUTION QUESTION
• Two random samples were drawn from two normal populations
and their values were
A 66 67 75 76 82 84 88 90 92
= 1.195 < . , . = 4.2
B 64 66 74 78 82 85 87 92 93 95 97

• Test whether the two populations have the same variance at 5 %


level of significance
3/3/2018 57 3/3/2018 58

10

You might also like