Cheat Sheet PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Statistical Inference by Ahmad Jalil Ansari (Bahria University)

Home Assignment#06 (Assorted Questions)

Cheat Sheet

There could be various cases in testing hypotheses


a) z-test for one mean
b) t-test for one mean
c) z-test for one proportion
d) t-test for one proportion
e) z-test for two means
f) t-test for two means
g) z-test for two proportions
h) t-test for two proportions
i) Test for Goodness of Fit
j) Test for Independence of variables
k) Test for Homogeneity of Proportions

Determining the case


1. If contingency table or pattern is given it is a case of either of Tests for Goodness of Fit or Independence
or Homogeneity.
2. If we are given to compare two variables, it is case of two sample test:
a. If means are given
i. If either any sample size > 30 or population variance is known then use z-distribution for
two samples
ii. Otherwise t –distribution for two samples
b. If proportions are given
i. If either any sample size > 30 or population variance is known then use z-distribution for
two samples
ii. Otherwise t –distribution for two samples
3. If we are given to compare one variable with a given value or number, it is case of one sample test:
a. If means are given
i. If either any sample size > 30 or population variance is known then use z-distribution for
two samples
ii. Otherwise t –distribution for two samples
b. If proportions are given
i. If either any sample size > 30 or population variance is known then use z-distribution for
two samples
ii. Otherwise t –distribution for two samples
Statistical Inference by Ahmad Jalil Ansari (Bahria University)
Home Assignment#06 (Assorted Questions)

Comparing Two Proportions


Suppose we wish to compare the proportions of two populations that have a specific characteristic, such as
the proportion of men who are left-handed compared to the
proportion of women who are left-handed. The figure illustrates the
conceptual framework of our investigation.
 Each population is divided into two groups, the group of
elements that have the characteristic of interest (for example,
being left-handed) and the group of elements that do not.
 We label one population as Population 1 and the other as
Population 2, and subscript the proportion of each population
that possesses the characteristic with the p1 and p2.
 We draw a random sample from Population 1 and label the
sample statistic with the 1. Then we draw a sample from
Population 2 and label its sample statistic with the 2.
𝑋 +𝑋 ̂+𝑛
𝑛1 𝑝 ̂2
2𝑝
 We find the joint proportion of two samples using 𝑝̅ = 𝑛1 +𝑛2 = 1
which represents the
1 2 𝑛1 +𝑛2
probability of success of jointly happening of x1 and x2 (the characteristic of interest).
 Then 𝑞̅ = 1 − 𝑝̅ which represents the probability of failure of jointly happening of x 1 and x2.
(𝑝̅1 −𝑝̅2 )−(p1 - p2) (𝑝̅1 −𝑝̅2 )−(p1 - p2)
 Then z = 1 1
or t= 1 1
[depending on situation]
√𝑝̅ 𝑞̅(𝑛 +𝑛 ) √𝑝̅ 𝑞̅(𝑛 +𝑛 )
1 2 1 2
 Compare this test or calculated value with critical value of z or t to decide about null hypothsis.
z-test for one mean
𝑥̅ − 𝜇
𝑧= 𝜎
⁄ 𝑛

A researcher reports that the average salary of assistant professors is more than $42,000. A sample of 30
assistant professors has a mean salary of $43,260. At α = 0.05, test the claim that assistant professors earn
more than $42,000 per year. The standard deviation of the population is $5230.
𝑥̅ −𝜇 43260 −42000
Step 3 Test value: 𝑧= 𝜎 = 5230⁄ = 1.32
⁄ 𝑛
√ √30

t-test for one mean


𝑥̅ − 𝜇
𝑡= 𝑠
⁄ 𝑛

A medical investigation claims that the average number of infections per week at a hospital is 16.3. A random
sample of 10 weeks had a mean number of 17.7 infections. The sample standard deviation is 1.8. Is there
enough evidence to reject the investigator’s claim at α = 0.05?
Step 3 Test value:
Using given data 𝑥̅ = 17.7, 𝑠 = 1.8
𝑥̅ −𝜇 17.7 −16.3
𝑡= 𝑠 = 1.8⁄ = 2.46
⁄ 𝑛
√ √10

z-test for one proportion


𝑝̅ −𝑝
𝑧= 𝑠 = √𝑝𝑞⁄𝑛 𝑝̅ = x/n
𝑠
Statistical Inference by Ahmad Jalil Ansari (Bahria University)
Home Assignment#06 (Assorted Questions)

A dietitian claims that 60% of people are trying to avoid fats in their diets. She randomly selected 200 people
and found that 128 people stated that they were trying to avoid fats in their diets. At α = 0.05, is there enough
evidence to reject the
Dietitian’s claim?
Step 3 Test value: Using given data 𝑝̅ = x/n = 128/200 = 0.64
𝑠 = √𝑝𝑞 ⁄𝑛 = √0.6 × 0.4⁄200 = 0.3464
𝑝̅ −𝑝 0.64 −0.6
𝑧= = = 1.15
𝑠 0.3464
t-test for one proportion
𝑝̅ −𝑝
𝑡= 𝑠 = √𝑝𝑞⁄𝑛 𝑝̅ = x/n
𝑠

z-test for two means


(𝑥̅1 − 𝑥̅ 2 ) − (µ1 - µ2)
z=
𝜎12 𝜎22

𝑛1 + 𝑛2
A survey found that the average hotel room rate in New Orleans is $88.42 and in Phoenix is $80.61. Two
samples of 50 for each hotels taken. The standard deviations of their populations are $5.62 and $4.83,
respectively. At α = 0.05, can we conclude that there is a significant difference in the rates?
(𝑥̅ 1 −𝑥̅2 )−(µ1 - µ2) (88.42−80.61)− 0
Step 3 Test value: z= = 2 2
= 7.45
𝜎2 𝜎2 √5.62 +4.83
√ 1+ 2 50 50
𝑛1 𝑛2

t-test for two means


(𝑥̅1 − 𝑥̅ 2 ) − (µ1 - µ2)
t=
𝑠12 𝑠22

𝑛1 + 𝑛2
The average sizes of farms in two counties are 191 and 199 acres. Data were obtained from two samples with
standard deviations of 38 and 12 acres, and sample sizes of 8 and 10, respectively. Can it be concluded at α =
0.05 that the average size of the farms in the two counties is different?
(𝑥̅ 1 −𝑥̅2 )−(µ1 - µ2) (191−199)− 0
Step 3 Test value: t= = 2 2
= -0.57
𝑠2 𝑠2 √38 +12
√ 1+ 2 8 10
𝑛1 𝑛2

z-test for two proportions


(𝑝̅1 −𝑝̅2 )−(p1 - p2) ̂+𝑛
𝑛1 𝑝1 ̂2
2𝑝 𝑋 +𝑋
z= 𝑝̅ = = 𝑛1 +𝑛2
1 1 𝑛1 +𝑛2 1 2
√𝑝̅ 𝑞̅(𝑛 +𝑛 )
1 2
In a nursing home study, the researchers found that 12 out of 34 small nursing homes had a resident
vaccination rate of less than 80%, while 17 out of 24 large nursing homes had a vaccination rate of less than
80%. At α = 0.05, test the claim that there is no difference in the proportions of the small and large nursing
homes with a resident vaccination rate of less than 80%.

Step 3 Test value:


Statistical Inference by Ahmad Jalil Ansari (Bahria University)
Home Assignment#06 (Assorted Questions)

𝑝̂ 1 = 𝑋1⁄𝑛1= 12/34 = 0.35 𝑝̂ 2 = 𝑋2⁄𝑛2= 17/24 = 0.71

12+17 29
𝑝̅ = 34+24 = 58 = 0.5  𝑞̅ = 0.5

(𝑝̅1 −𝑝̅2 )−(p1 - p2) (.35−0.71)− 0


z= 1 1
=
1 1
= -2.7
√𝑝̅ 𝑞̅(𝑛 +𝑛 ) √0.5×0.5(34+24)
1 2

t-test for two proportions


(𝑝̅1 −𝑝̅2 )−(p1 - p2) ̂+𝑛
𝑛1 𝑝1 ̂2
2𝑝 𝑋 +𝑋
t= 𝑝̅ = = 𝑛1 +𝑛2
1 1 𝑛1 +𝑛2 1 2
√𝑝̅ 𝑞̅(𝑛 +𝑛 )
1 2

Test for Goodness of Fit


 A frequency distribution (observed data) and pattern are given
 Create a frequency distribution (expected data) using pattern
(𝑂−𝐸)2
 Use χ2 = ∑ 𝐸

Test for Independence


 Data related to two or more variables are given (observed data)
 Create a frequency distribution (expected data) using
(𝑟𝑜𝑤 𝑠𝑢𝑚) (𝑐𝑜𝑙𝑢𝑚𝑛 𝑠𝑢𝑚)
Expected value of each cell = 𝐺𝑟𝑎𝑛𝑑 𝑇𝑜𝑡𝑎𝑙
(𝑂−𝐸)2
 Use χ2 = ∑ 𝐸

Test for Homogeneity


Proportions related to two different population are given
 Data related to two or more variables are given (observed data)
 Create a frequency distribution (expected data) using
(𝑟𝑜𝑤 𝑠𝑢𝑚) (𝑐𝑜𝑙𝑢𝑚𝑛 𝑠𝑢𝑚)
Expected value of each cell = 𝐺𝑟𝑎𝑛𝑑 𝑇𝑜𝑡𝑎𝑙
(𝑂−𝐸)2
 Use χ2 = ∑ 𝐸

You might also like