Professional Documents
Culture Documents
3/3/2018 2
1
03/03/2018
3/3/2018 7 3/3/2018 8
test.
3/3/2018 11 3/3/2018 12
2
03/03/2018
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:
̅ ̅
̅ ̅ • =
• = ( )
∗
3
03/03/2018
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
6
03/03/2018
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
3/3/2018 45 3/3/2018 46
8
03/03/2018
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/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
10