TESTS OF HYPOTHESES
Hypothesis means a statement made about the population. Drawing inferences from that hypothesis is possible through the technique called ‘statistical hypothesis testing’, which is the branch of statistical inferences. Based on sample data we draw conclusions about population statistical constants.
There are two types of hypothesis:
1.
NULL HYPOTHESIS
:
This is the first and definite statement about the population parameter. It is a statement of no difference and is denoted by H0.
Example:-
a) In case of a single population, H0 will be there exist no significant difference
between the statistics and parameters. (Or)
The parameter assumes some hypothetical value (H0 : μ=μ0) (say)
b) In case of two populations, H0 will be there exists no significant difference
between two population parameters (H0: μ1=μ2)
2.
ALTERNATIVE HYPOTHESIS
:
Any hypothesis which is complementary to the null hypothesis is called an alternative hypothesis and is denoted by H1
Example:
a) In case of single population to test a hypothesis H0: μ=μ0 , various alternative
hypothesis will be H1 : μ≠μ0
H1 : μ>μ0
H1 : μ<μ0
b) In case of two populations, the alternative hypothesis will be H1 : μ1≠μ2
H1 : μ1> μ2
H1 : μ1< μ2
Errors in Sampling:
In testing statistical hypothesis to draw valid inferences about the population parameters on the basis of sample, we may commit two types of errors:
1. Type І error 2. Type ІІ error
Type І error: Reject H0 when it is true
α =P ( Reject H0 when H0 is true.)= P( Type І error)
Type ІІ error: Accept H0 when it is false.
β=P( Accept H0 when it is false)= P(Type ІІ error)
Critical region:
In testing of hypothesis, a test statistic (t) calculated from sample data, is used to accept or reject the null hypothesis. Consider the area under the probability curve of the sampling distribution of the test statistics t which follows some known distribution. This area under the probability the curve is divided into two regions: the region of Rejection, and the region of Acceptance. The region where H0 is rejected called critical
region, and the region of acceptance is where H0 is accepted. Thus critical region is the
region of rejection of H0 and is denoted by w
Level of Significance (l.o.s):
The size of the critical region is called level of significance and is denoted by α.Critical value (or) significant value:
The value of the test statistic, which separates the critical region (or rejection region) and the acceptance region is called the critical value or significant value. It depends on
1) The level of significance used, and
2) The alternative hypothesis, whether it is one – tailed or two tailed.
Note: The critical value of z for a single tailed test (left or right) at level of significance
‘α’ is same as the critical value of z for two tailed test at level of significance 2α
.
Critical values of Z :
Different values of Zα at different l.o.s are as follows: level of Significance
1% 5% 10%
Two tailed test Zα =2.58 Zα =1.96 Zα =1.645
Right tailed test Zα =2.33 Zα =1.645 Zα =1.28
Left tailed test Zα = -2.33 Zα = -1.645 Zα = -1.28
STEP 1 : set up a null hypothesis H0
STEP 2 : set up an alternative hypothesis H1 and decide whether it is one-tailed or
two-tailed.
STEP 3 : fix the level of significance (α) STEP 4 : compute the suitable test statistic
STEP 5 : conclusion can be drawn by comparing the calculated value of the test statistic with that of the tabulated value.
If calculated value lies in the acceptance region, we accept H0 , otherwise reject H0
For large sample tests we use STANDARD NORMAL TEST STATISTIC and in case of small samples we use t, f, X2 etc.. for various parameters.
Test procedure for testing the significant difference between sample mean
and the population mean :
1. Null hypothesis:
The population mean assumes the given value i.e., H0: µ=µ0
2. Alternative hypothesis:
The population mean is not equal to the given value i.e., H1 : µ≠µ0
3. l.o.s: Fix the LOS α
4. Under H0, compute the test statistic
Z=
x−µ σ
√
n∼N(0,1)
Where x= sample mean µ= population mean σ= population S.D n= sample size
If σ is unknown, it can be replaced by sample S.D = s;
5. Conclusion: Compare Zcal with Ztab and accept H0 if Zcal lies in the acceptance region.
Note: When the sample size is less than 30, that is,n<30 then instead of Z we calculate
t:
t=
(x−µ) S/√ n
,
which follows student’s t distribution with (n-1) d.f
S
2=
( 1n−1)∑(xi−x)2 or
S
2 = (ns2)/ (n-1)Problem
: In a random sample of 60 worker , the average time taken by them to get to work is 33.8 min. with a standard deviation of 6.1min.can we reject the null hypothesisµ=32.6min in favour of alternative null hypothesis µ>32.6 at α=.025 level of significanceSolution:
Given n=60, x =33.8, µ=32.6 and σ =6.1 Null hypothesis Ho: µ=32.6
Alternative hypothesis H1: µ>32.6 Level of significance, α=0.025 The test statistics is Z=x- µ/ (σ/√n)
=33.8-32.6/ (6.1/√60)=1.5238
Conclusion:
Value of Z at .05 l.os for a right tail test is 2.58 Hence calculated Z< tabulated value of Z Therefore null hypothesis Ho is accepted.
Problem:
Life time of sample of 25 fluorescent light bulbs produced by a company is computed to be 157 hours with a S.D of 120 hours the company claims that the average life of bulbs
produced by the company is 1600 hours using the level of significance .05 is the claim acceptable?
Solution:
Given sample size n=25
Sample mean = x=¿1570
Sample S.D = 120,S2=n S2/n-1=125,S=12.02
Degree of freedom = n-1=24
Null Hypothesis Ho: The claim is acceptable,µ=1600 hrs Alternative Hypothesis H1:µ≠1600 hrs
l.o.s=.05
The test statistic is t =¿-µ)/(S/√n)=1570-1600/(12.02/√25)=-12.5
Therefore │t│= 12.5
Conclusion: The tabulated value of t at 5% level with 24 degrees of freedom for two tailed
test is 2.06
Test procedure for testing the significant difference between
two population means:
1) Null Hypothesis:
There exist no significant difference between the two population means i.e., H0: µ1=µ2
2) Alternative Hypothesis:
Both the means are not equal H1: µ1≠µ2
3) Fix the LOS α 4) Under H0
Z=
(
x1−x2)−(
µ1−µ2)
√
(σ12
n1 + σ22
n2 )
, (0, 1)
x1 and x2 are the means of first and se
cond sample respectively, n1 and n2 are the sizes of first and second samples σ21and σ22 are
the variance of first and second population in case σ21and σ 2
2 are known we can write s1 2
and s2 2
If both populations have common S.D then:
Z=
(
x1−x2)−(
µ1−µ2)
√
σ2(1 n1+1
n2)
5) Conclusion: compare Zcal with Ztab and accept H0 if Zcal otherwise reject H0
Note:
In case of small sample i,e., n1 and n2 are less than 30 then
t=
(
x1−x2)−(
µ1−µ2)
√
s2( 1 n1+
1
n2)
Where S2 = ∑(x
1−x)2+∑¿ ¿ ¿
=
n1s12+n2s22n1+n2
Conclusion: compare tcal with ttab and accept H0 if tcal falls in the acceptance region
Problem
: In a survey of buying habits, 400 women shoppers are chosen at random in super market ‘A’ in a certain section of the city. their average weekly food expenditure is Rs.250 with a S.D of Rs.40 for 400 women shoppers chosen at random in super market ‘B’ in another section of the city, the average weekly food expenditure is Rs.220 with a S.D of Rs55 test at 10% level of significance whether the average weekly food expenditure of the two population of shoppers are equal.Solution
:Given n1=400 x1 =Rs.250 S1=Rs.40
n2=400 x2=Rs.220 S2=Rs.55
1. Null hypothesis: assume that the average weekly food expenditure of the two population of shoppers are equal i.e., Ho: µ1=µ2
2. Alternative hypothesis (H1): µ1≠µ2
3. Test statistics is Z=
x1
¿ −x2
√
s12n1 +
s22
n2
=
√ 250−220(40²/400+55²/400) =8.82
i.e. Z=8.82>2.58
Conclusion: Therefore null hypothesis Ho is rejected
I.e. the average weekly food expenditure of the two populations of shoppers are not equal.
Problem
:Toexamine the hypothesis that the husbands are more intelligent than the wives, an
investigators took a sample of 10 couple’s and administrated them a test which measures the I.Q. the results are as follows:
Husbands 117 105 97 105 123 109 86 78 103 107
Wives 106 98 87 104 116 95 90 69 108 85
Test the hypothesis with a reasonable test at the level of significance of 0.05
Solution
:We have
n
1=10 ,n
2=10 and
x = (117+105+97+105+123+109+86+78+103+107)
=
103010 = 103Y =(106+98+87+104+116+95+90+69+108+85)
10
=
95810=
95.8Now we compute the standard deviation of both samples
X X-x (X-x)² Y Y-Y (Y-Y)² 117
105 97 105 123 109 86 78 103 107
14 196 106 10.2 104.04 02 04 98 2.2 4.84 -6 36 87 -8.8 77.4
2 4 104 8.2 67.24 20 400 116 20.2 408.04 6 36 95 -0.8 -0.64 -17 289 90 -5.8 33.64 -25 625 69 -26.8 718.24 0 0 108 12.2 148.84 4 16 85 -10.8 116.64 103 1606 958 1679.6
S² =
∑(x−x)2+∑¿ ¿ ¿
=1/18 [1606+1679.6] = 1/18(3285.6) = 182.53
Therefore S = 13.51 The procedure is
1. Null hypothesis: Ho: H0: μ1=μ2 (i.e., no difference in I.Q.)
2. Alternative Hypothesis H1:µ1>µ2
(i.e., husbands are more intelligent than wives) 3. Level of significance, α= 0.05
4. The test statistic is t =x -Y/(S.√(1/n1+1/n2)
= 103 – 95.8 / (13.51)√ (1/10+1/10) = 1.19168
5. Conclusion:
Since t cal = 1.19168< t tab = 1.734, we accept the null hypothesis Ho i.e.,
Paired t-test
:
Testing difference between Means of Two Samples (Dependent Samples or
Matched or Paired Observations):
Two samples are said to be dependent when the elements in one sample are related to those in the other in any significant or meaningful manner. In fact, the two samples may consist of pairs of observations made on the same object, individual or, more generally, on the same selected population elements. When samples are dependent they comprise the same number of elementary units, we may carry out some experiment, say, to find out the effect of training on some employees.
The t-test based on paired observations id defined by the following formula:
t =
d(S/√ n) tn-1
Problem:
To verify whether a course in accounting improved performance, a similar test was given to 12 participants both before and after the course. The original marks recorded in alphabetical order of the participants, were 44, 40, 61, 52, 32, 44, 70, 41, 67, 72, 53, and 72. After the course, the marks were in the same order, 53, 38, 69, 57, 46, 39, 73, 48, 73, 74, 60, 1nd 78.Was the course useful?Solution
: Let us take the hypothesis that is no difference in the marks obtained before and after the course, i.e., the course has not been useful.H0 : μ1= μ2
H1 : μ1< μ2
α= 0.05
Applying t-test (difference formula): t = d/(S/√n )
Participants Before (1st Test)
After (2nd Test)
(2nd-1st Test)
d d2 A B C D E F G H I J K L 44 60 61 52 32 44 70 41 67 72 53 72 53 38 69 57 46 39 73 48 73 74 60 78 +9 -2 +8 +5 +14 -5 +3 +7 +6 +2 +7 +6 81 4 64 25 196 25 9 49 36 4 49 36 ∑d = 60 ∑d2 = 578
S = √(∑d2/n)– (∑d /n)2 ) 2 = √578 – 12(5)2 = √278 = 5.03
Calculated value of t=5 x √12/5.03=3.443
d.f= v = n-1= 12-1=11; , For v= 11, t0.05 = 2.201
Conclusion: The calculated value of t is greater than the table value. Therefore Null
hypothesis is rejected. Hence the course has been useful.
CHI SQUARE TEST (χ²-TEST):
χ²-Test for independence of attributes
:
Attribute means a quality or characteristic. The χ²-Test is useful to test whether two attributes are independent or not (in both the cases of dichotomous aswellas manifold classifications).
The Procedure is as follows: 1) Null Hypothesis:
The given two attributes are independent or they are not associated H0= ∑∑ Oij = ∑∑ Eij
2) Alternative hypothesis: The two attributes are not independent. 3) Fix the Level Of Significance ά.
4) Under H0, compute χ² = ∑∑¿ ¿~ χ² (m-1)(n-1)
m = number of rows n = number of columns
where Oij = Observed frequency of the ith row & jth column
Eij = Expected frequency of the ith row & jth column
Eij = (ith row total ×jth column total)/grand total (N)
= (Ri ×Cj)/N
Conclusion:
Compare the χ²cal with the χ²tab and ifχ² cal is less than the χ²tab accept H0 otherwise reject
H0.
2×2 CONTINGENCY TABLE (Dichotomous):
Consider two attributes A& B where each one is classified in two ways only. The 2×2 contingency table is as follows.
a
bc d
χ²
= (a (N(ad−bc)²)+b)(c+d)(a+c)(b+d)¿¿
Pooling:
If Eij is less than or equal to 5 then in the m×n contingency table. If any one of the Eij is less
than 5 we got for pooling .i.e., add that frequency to the frequency above or below to that. Then degrees of freedom.
d.f = (m-1)(n-1) – 1 If two are pooled
d.f = (m-1)(n-1) – 2
χ²
= (a+(N[b¿)(cad−bc∨−N+d)(a+c)(b+/2]²d))Problem: From the following data, find whether there is any significant liking in the habit of
taking soft drinks among the categories of employees Employees
Soft drinks clerks teachers officers
PEPSI 10 25 65 THUMSUP 15 30 65 FANTA 50 60 30
Solution
:1. Null hypothesis Ho: The categories of employees and their liking in the habit of taking soft drinks among the categories of employees are independent.
2. Alternative hypothesis H1: they are not independent. 3. Level of Significance=0.05
4. Computations
Soft drinks clerks teachers officers Total PEPSI 10 25 65
THUMSUP 15 30 65 FANTA 50 60 30
100 110 140 Total 75 115 160 350 Expected frequencies,Eij’s can be calculated as
75 x100/350=21.4 115 x100/350=32.9 160x100/350=45.71 75 x110/350=23.6 115 x110/350=36.1 160 x 110/350=50.3 75 x 140/350=30 115 x 140/350=46 160 x 140/ 350=64
The calculated value for χ² can be obtained in the next table
observed frequency(Oij) Expected frequency (Eij) (Oij-Eij)² (Oij-Eij)²/Eij
10 21.4 129.96 6.073 25 32.9 62.41 1.897 65 45.7 372.49 8.151 15 23.6 73.96 3.134 30 36.1 37.1 1.031 65 50.3 216.09 4.3 50 30 400 13.333 60 46 196 4.261 30 64 1156 18.062
Therefore calculated χ² =60.2425
Conclusion
: Tabulated χ² for (3-1)(3-1)=4 d.f at 5% level of significance is 9.488 Since calculated χ²>tabulated χ²,we reject the null hypothesis HoThus we conclude that the habit of taking soft drinks depends on categories of employees.
Problem:
To determine whether there is a relationship between an employee’s performances in the company’s training program and his or her ultimate success in the job, the company takes a sample of cases from its very extensive files and obtains the results in the following tableSuccess in job
Performance in training program Satisfactory Not Satisfactory Satisfactory
8 10
Not Satisfactory
6 36
Solution
:
1. Null hypothesis (Ho): The employee’s performance in the company’s training program and his or her ultimate success in the job are independent.
2. Alternative hypothesis (H1): They are not independent.
3. Level of Significance=0.05 4. Computations:
To calculate the expected frequencies,
Success in job
Performance in training program
Satisfactory Not Satisfactory Total
Satisfactory
8 10 18
Not
Satisfactory 6 36
42
Total 14 46 N=60
E
11=
1460X18=1.8 E
12=
4660X18= 13.8
E
21=
1460X42=9.8 E
22=
4660X42=32.2
As one expected frequency is less than 5, we use Yates ’correction which is as
follows:
χ²
= (a+(N[b)(c¿ad−bc∨−N/2]²) +d)(a+c)(b+d)=
(60[¿8∗36−10∗6∨−60/2]²)(18X42X14X46)
= 4.83
Conclusion: The tabulated value of χ² 1 d.f is 3.84.Comparing χ²cal with the χ²tab, χ²cal > χ²tab.
i.e.;
the employee’s performance in the company’s training program and his or her ultimate success in the job are not independent.ANALYSIS OF VARIANCE
Analysis of variance (abbreviated as ANOVA) is an extremely useful technique concerning researches in the fields of economics biology, education, psychology, sociology, business or industry and in researches of several other disciplines. This technique is used when multiple sample cases are involved.
The ANOVA technique is important in the context of all those situations where we want to compare more than two population means such as in the comparison of the yield of crop from several varieties of seeds, the lifetime of different brands of bulbs etc.
ANOVA(1-way) TECHNIQUE
Under the one way ANOVA, we consider only one factor and then observe that the reason for said factor to be important is that several possible types of samples can occur with in that factor.
The technique involves the following steps;
Null Hypothesis (H0) : All the treatment means are equal
Alternative Hypothesis (H1): They are not equal.
Fix The Level Of Significance ά Calculations:
Correction factor = c.f= ((Grand Total)²)/no. of observations. Sum of squares due to rows = s.s.t = ∑ (ti²/n)- c.f
Total Sum Of Squares = ∑∑ yij² - c.f
ANOVA Table:
Source of variation SS (Sum of
Squares)
Degrees of Freedom(v)
Mean Sum of Squares
Variance Ratio ( F) Between samples
Within the samples SSR SSE
v1= c-1 v2 = n-c
MSR=SSr/(c-1) MSE=SSE/(n-c) F= MSR/MSE T R E A T M E N T S
1 Y11 Y12 Y13 ……… ………….. Y1n T1
2 Y21 Y22 Y23 ………….. ………….. Y2n T2
3 Y31 Y32 Y33 ………….. ………….. Y3n T3
… … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … ..
m Ym1 Ym2 Ym3 ………….. ………….. Ymn Tm
………….. …………..
GRAND
TOTAL
Total TSS n-1
TSS = Total sum of squares of variations. SSR = Sum of squares between rows SSE = Sum of squares within samples
MSC = Mean sum of squares between samples MSE = Mean sum of squares within samples.
Conclusion: If F cal less than Ftab, accept Ho, otherwise reject Ho
Problem
:A part of investigation says that the soldiers are placed in three different positions and they required to use the forces s follows
Position 1: 90, 82, 79, 98, 83, 91 Position 2: 105, 89, 93, 104, 89, 95, 86 Position3: 83, 89, 80, 94
Perform ANOVA
Solution
:1. Null hypothesis µ1=µ2=µ3
2. Alternative Hypothesis: µ1≠µ2≠µ3
3. Level of significance:α=0.05
Criterion: Reject the null hypothesis if F>3.74, the value of F0.05 for
k-1=3-1=2 and N-k=17-3=14 degrees of freedom, where F is to be determined by ANOVA
Calculations: substituting n1=6, n2=7, n3=4, N=17,
T1=523, T2=661, T3=346. G=1530 and ∑∑y2ij=138638 into the computing formulas
for the sum of squares, We get
C.f = (1530)2 / 17 = 137700
TSS=138638-((1530)2/17) =938
SSR= ((523)2/6) + ((661)2/7) + ((346)2/4)-((1530)2/17)=234
And SSE=938-234=704
The remainder of work is shown in the following analysis of variance table: Source of
variation Degree of
freedom
Sums of squares
Mean
square F
Positions 2 234 117 2.33
Error 14 704 50.3
Decision : since F=2.33 does not exceeds 3.74 the null hypothesis cannot be rejected. We cannot conclude that there is a difference in the mean of forces at three different positions.
ANOVA:(TWO WAY):
Two way ANOVA technique is used when the data are classified on the basis of two factors. For example a business firm may have its sales data classified on the basis of different salesmen and also on the basis of sales in different regions, the ANOVA technique is as follows:
Null Hypotheses:
1) All the treatment means are equal. 2) All the block means are equal Alternative Hypothesis :
1) All the treatment means are not equal.
T
R
E
A
T
M
E
N
T
S
BLOCKS
1
2
3
…………..
a
b
c
………
n
1
y
11y
12y
13……… y
1ay
1bY
1c…………..
y
1nR
12 Y21 y22 y23 ………….. y2a y2b Y2c ………….. y2c R2
3 Y31 y32 y33 ………….. y3a y3b Y3c ………….. y3n R3
… … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … .. … … … … ..
M ym1 ym2 ym3 ………….. yma ymb ymc ………….. ymn
c1 c2 c3 ………….. ca cb cc …………..
GRAND TOTAL
2) All the block means are not equal Fix The Level of Significance ά
Correction factor = c.f= ((Grand Total)²)/no.of observations. Sum of squares of rows = s.s.t = ∑ (Ri²/n)- c.f
Sum of squares of columns = s.s.b = ∑ (Ci²/n)- c.f
Total Sum of Squares = ∑∑ yij² - c.f
For a TWO-WAY classification, the analysis of variance table takes the following form: Source of variation Sum of
Squares
Degree of Freedom
Mean Sum Of Squares
Ratio of F 1)columns
2)rows
3)Residual or error
SSC
SSR
SSE
(c-1)
(r-1)
(c-1)(r-1)
MSC=SSC/(c-1)
MSR=SSR/(r-1)
MSE=SSE/(r-1)(c-1)
F1=MSC/MSE
F2=MSR/MSE
Total SST n-1
SSC = Sum of squares between columns SSR = Sum of squares between rows SSE = Sum of squares due to error SST = Total sum of squares.
Conclusion: If any of the F cal is less than the corresponding F tab; accept Ho otherwise reject
Ho
Problem
:The following data says that in four different subjects the students scored different marks in 3 mid tests. Looking at the subjects as treatments and mid tests as blocks test whether there are differences in the subjects or mid tests.
Mid 1 Mid 2 Mid 3 Totals
Maths 45 43 51 139
Science 47 46 52 145
English 48 50 55 153
Social 42 37 49 128
Totals 182 176 207 565
Solution
:i. Null hypothesis: α1= α2= α3= α4=0 ;β1= β2= β3= β4=0
iii. Level of significance α=0.01
Criteria: for treatment reject the null hypothesis if F>9.78 the value of F0.01 with
a-1=4-1=3, and (a-1))b-1)= (4-1)(3-1)=6 degrees of freedom: for blocks reject the null hypothesis if F10.92 the value for F>10.92 the value for F0.01 for b-1=3-1=2 and
(a-1)(b-1)=(4-1)(3-1)=6 degrees of freedom.
4. Calculations: No.of rows=a=4. No.of columns=b=3,
R1=139, R2=145, R3=153,R4=128. C.1=182, C.2=176, C.3=207,G..=565 and ∑∑y2ij = 26867
into the formulas for the sum of squares, we get C.f=(565)2/12=26602
SSR=(((139)2+(145)2+(153)2+(128)2)/3)-26602=111
SSC= (((182)2+(176)2+(207)2)/4)-26602=135
SSE =265-11-136=19
Then the dividing sums of squares by their respective degrees of freedom to obtain the appropriate mean squares:
Source of
variation Sum ofsquares Degrees of freedom Mean square F Subjects(rows
) 111 3 37.0 11.6
Mid
tests(columns)
135 2 67.5 21.1
Error 19 6 3.2
Total 265 11
Decision
: since Frows=11.6 exceeds 9.78 the value of F0.01 with 3 and 6 degrees offreedom, we conclude that there are differences in the effectiveness of four subjects.
Also since Fblock=21.1 exceeds 10.92 the value of F0.01 with 2 and 6 degrees of
NON-PARAMETRIC TESTS
Statisticians have devised alternate procedure which can be used to test hypothesis about data which are non-normal or for which meaningful sample statistics cannot be calculated. Since these tests do not depend on the shape of the distributions they are called distribution-free tests. These tests do not depend upon the population parameters such as the mean and the variance they are also called NON-PARAMETRIC TESTS.
A large number of non-parametric tests exist but here we will discuss only a few of the better known and more widely used ones. These are:
1. The sign test 2. A rank sum test
3. The one sample run test 4. The Kruskal-Wallis or H test