Professional Documents
Culture Documents
Hypothesis Testing
Hypothesis Testing
Testing
vijay.gahlawat@gmail.com
Introduction
•A statistical hypothesis is an assumption about an
unknown population parameter.
•It is a well defined procedure which helps us to decide
objectively whether to accept or reject the hypothesis
based on the information available from the sample.
•In statistical analysis, we use the concept of probability to
specify a probability level at which a researchers
concludes that the observed difference between the sample
statistics and population parameter is not due to chance.
Hypothesis Testing
Procedure
Step 1: - Set Null and Alternative Hypothesis
1. Reject the H0
x
z
n
0.4750 0.4750
0.025 0.025
-1.96
+1.96
0
Solution
Step-5: Collect the sample data
Sample size is 200=n, and Sample Statistic (Sample
Mean) = 11000.
Step-6: Analyze the data.
n=200, µ=10000, σ =1200, x bar or mean = 11000
11000 10000
z 11 .79
1200
200
Solution
Step-7:Arrive at a Statistical Conclusion
Calculated value of Z is 11.79
And tabulated value of Z is 1.96
As Calculated > Tabulated , We reject the null Hypo
Means Mr. X’s doubts about this average
household income was right.
When population S.D. is unknown. The population
S.D. (σ) is replaced by sample S.D. (s).
Then z
x
s
n
H1 : 1 # 2
n1 1000. σ1 2.5 n 2 2000. σ 2 2.5
x1 67.5. x 2 68.0
z
x 1
x 2 μ1 μ 2
67.5 68.0 0
-5.1
2 2
σ1 σ 2 (2.5) 2 (2.5) 2
n1 n2 1000 2000
Z - 5.1 5.1
When we have sample size < 30. to test the hypothesis about
population parameter we use t-test.
The t-statistic is a standardized score for measuring the
difference between the sample mean and the null
hypothesis value of the population mean:
t
x 1
x 2 μ1 μ 2
s1 (n1 1) s 2 (n 2 1) 1 1
2 2
n1 n 2 2 n1 n 2
χ
2 f0 fe
,
fe
f 0 Observed Frequencies
f1 Expected Frequencies
Conditions for applying chi square
• The sample should consist of at least 50
observations and should be drawn randomly from
the population.
• The individual observation in a sample should be
independent to each other.
• Data should not be presented in the % or ratio form,
rather they should be expressed in original units.
• Sum of the frequencies must be 5 or more.
2
χ Goodness of fit Test
This test compares the theoretical frequencies with
the observed frequencies to determine the difference
between theoretical and observed frequencies.
Ho : coin is unbiased
Let p = the probability of getting a head = ½
From binomial distribution, expected frequencies
are:
F(x) = N.P(x), where
n!
P(x) p x q n x
(n - x)!(x)!
N 3200, n 5, p 1/2, q 1 - p 1/2
n!
P(x) p x q n x
(n - x)!(x)!
5!
Frequecny of 0 head 3200.P(0) 3200. (1/2)x (1/2)n x
(5 - 0)!(5)!
F (0) 100
similarly
F (1) 3200.P (1) 500, F(2) 1000, F(3) 1000
F(4) 500, F(5) 100
No. of Observed Expected (fo-fe) (fo-fe)
Heads Frequency Frequency
(fo) (fe)
0 80 100 400 4
1 570 500 4900 9.8
2 1100 1000 10000 10
3 900 1000 10000 10
4 500 500 0 0
5 50 100 2500 25
58.8
Example
• A marketing research firm conducted a survey 4 years ago
and found that the avg. household income of a particular
region is Rs. 10050. Mr. X, Who recently joined the firm as
vice president has expressed doubts about the accuracy of
the data. For verifying the data, the firm has decided to take
a random sample of 200 households that yields a sample
mean (income) of Rs. 11000. Assume that the population
S.D. of the household income is Rs. 1500. Verify Mr. X’s
doubts using the 7 step hypothesis testing. Let α=0.05.