Module 6 (Full)
Module 6 (Full)
Student’s t-test
F-test
Chi-square test
Goodness of fit
Independence of attributes
Design of Experiments - CRD- RBD- LSD
Analysis of variance
One and Two way classifications
Small Sample Tests
In this study, we discuss test of significance for small samples. The important tests for
small samples are
• t-test
• F-test
Note:
Large Sample: Size of the sample is greater than or equal to 30.
Small Sample: Size of the sample is less than 30.
T-test
When the population standard deviation is not known and the size of the sample is
less than thirty, we use t-test.
2
i
Or one can write , where S=
(students t)
A random variable X is said to follow t−distribution, if its probability density function is
given by
Properties of t-distribution:
1) The probability curve of t-distribution is symmetrical.
2) The tails of the curve are asymptotic to x-axis.
3) When n→ ∞, t- distribution tends to normal distribution.
4) The form of the t-dist. varies with the degrees of freedom.
Then, find out tabular value based on the level of significance and degree of
freedom. To find value follow -distribution table. Compare calculated value
with tabular value and then conclude the result.
Computation of t value by using deviation method:
Where
Conclusions (two-tailed):
If the calculated value of |t| is less than the table value , then we accept null
hypothesis for the degrees of freedom and level of significance.
If the calculated value of |t| is greater than the table value , then we reject null
hypothesis for the degrees of freedom and level of significance.
70, 120, 110, 101, 88, 83, 95, 107, 100, 98.
Does this support the assumption of population mean of 100 mg/dl? Find a reasonable
range in which most of the mean fasting sugar test of the 10 boys lie.
Test statistic is
Let and be the sample means for two small samples drawn from the normal
population with means and . The test statistics is
or (For pooled)
Let and be the sample means for two small samples drawn from a normal
population. The test statistics is
Is there any significant difference between the average life of the two batteries at
5% level of significance?
Under null hypotheses 0 :
2 2
X F
p
2 2
p
Problem 3: The nicotine content in milligrams of the samples of tobacco were found as
follows
Sample A: 24, 27, 26, 21, 25.
Sample B: 27, 30, 28, 31, 22, 36.
Can it be said that the two samples come from normal populations with the same mean?
Paired T-Test
If 𝑛1 = 𝑛2 = 𝑛 and the pairs of values of 𝑥1 and 𝑥2 are associated (correlated),
then the usual two-sample t-test should not be used.
Where 𝑑𝑖 = 𝑥𝑖 − 𝑦𝑖 𝑖 = 1 2…𝑛
Mean difference: 𝑑ҧ = 𝑥ҧ − 𝑦,
ത with 𝑣 = 𝑛 − 1
Example
The following data relate to the marks obtained by 11 students in two tests; one
held at the beginning of the year and the other at the end of the year after
intensive coaching. Do the data indicate that the students have benefited by
coaching?
Test 1 (Beginning of the year): 19, 23, 16, 24, 17, 18, 20, 18, 21, 19, 20
Test 2 (End of the year): 17, 24, 20, 24, 20, 22, 20, 20, 18, 22, 19
Solution:
|Test 1|Test 2| (di = xi-yi) |
| 19 | 17 | 2 |
| 23 | 24 | -1 |
| 16 | 20 | -4 |
| 24 | 24 | 0 |
| 17 | 20 | -3 |
| 18 | 22 | -4 |
| 20 | 20 | 0 |
| 18 | 20 | -2 |
| 21 | 18 | 3 |
| 19 | 22 | -3 |
| 20 | 19 | 1 |
Problem
Memory capacity of 9 students was tested before and after a course of
meditation for one month. State whether the course was effective or not.
Before After
10 12
15 17
9 8
3 5
7 6 ?
12 11
16 18
17 20
4 3
F-test
A random variable X is said to follow F distribution, if its probability density function is
given by
Use of F distribution:
F distribution is used to test the equality of the variance of the populations from
which two small samples have been drawn.
F test of significance of the difference between population variances
To test the significance of the difference between population variances, we shall first
find their estimates, and based on the sample variances and . We compute
estimates by the following formulas:
σ 𝑥 − 𝑥ҧ 2
2
𝑆 =
𝑛−1
2 2
2 1
Test statistics is 2 , where or 2 , where
1 2
The value of F is greater than 1. Then, compare calculated value F with the table value
Fv1,v2 (α) (in case of ) or Fv2,v1 (α) (in case of ) by using F−table.
If the calculated value F is less than the table value, then fail to reject null hypothesis.
σ 𝑥 − 𝑥ҧ 2
2
𝑆 =
4.95 𝑛−1
Note: After computing two variance estimates and for two different
samples our next job is to compute F-test statistic value. If you look at the F-test
statistic formula and it’s provided condition always in numerator we are taking
highest value and in denominator lowest value of estimates.
Since the calculated value of F is less than the table value of F for [Link] (5, 6) at 5%
L.S we accept H0.
Example: A sample of size 13 gave an estimated population variance of 3.0, while
another sample of size 15 gave an estimate of 2.5. Could both samples be from
populations with the same variance?
-Test
In this study, we introduce chi-square distribution, the measure of which enables us
to find the degree of discrepancy between the observed and expected frequencies is
due to error of sampling or due to chance.
• It is a square of standard normal variate, i.e., z = x-μ/ σ
where
Oi = Observed frequencies &
Ei = Expected frequencies.
Note: It works with categorical data (frequencies), not raw continuous values
-Distribution
Let samples of size n be drawn from a normal population with standard deviation σ. If
for each sample we calculate χ2 a sampling distribution of χ2 can be obtained. It is
given by
• Each of the observations making up the sample for the χ2 test should be independent
of each other.
• The test is wholly dependent on the degrees of freedom.
• The frequencies used in a χ2 test should be absolute and not relative in terms.
• The expected frequency of any item or cell should not be less than 5. If it is less
than 5, then the frequencies from the adjacent items or cells should be pooled
together in order to make it 5 or more than 5
• The observations collected for χ2 must be based on the method of random sampling.
• σ 𝑂𝑖 = σ 𝐸𝑖 = 𝑁
Uses of χ2-Test
χ2-test is an important test. We require only the degrees of freedom for using
this test. It is used as a test of –
• Goodness of fit,
• Independence of attributes, and
• homogeneity. (This concept is not in your syllabus.)
χ2-test as a test of Goodness of fit
χ2-test is applied as a test of goodness of fit to determine whether the actual (i.e.
observed) frequencies are close to the expected (i.e. theoretical) frequencies. The
degrees of freedom in this case are v = n − 1, where n is the number of observations.
Problem 1: In 90 throws of a die, face 1 turned 9 times, face 2 or 3 turned 27 times,
face 4 or 5 turned 36 times and 6 turned 18 times. Test at 10% level if the die is honest.
1 9 15 2.4
2 or 3 27 30 0.3
4 or 5 36 30 1.2
6 18 15 0.6
Total 90 90 4.5
χ2
Since the calculated value of χ2 = 4.5 is less than the table value at 10% level of
significance and for 3 degrees of freedom (i.e., 6.25) , we accept the null
hypothesis, and conclude that the die honest/ unbiased.
Problem 2: A sample analysis of examination results of 500 students was made. It was
found that 230 students had failed. 160 had secured a third class, 80 were placed in
second class and 30 got first class. Do these figures commensurate with the general
examination results which is in the ratio 4 : 3 : 2 : 1 for various categories
respectively?
Solution: H0 : The observed results commensurate with the general examination results
H1 : It is not true that the observed results commensurate with the general examination
results.
Level of significance=5%. Degrees of freedom=4 − 1 = 3.
The total frequency=N = 500.
2
i i
Class/division Observed Oi Expected Ei i
Failed 230 200 4.500
Third 160 150 0.666
Second 80 100 4.000
First 30 50 8.000
χ2
Since the calculated value of χ2 is (17.066) greater than the table value of χ2
(7.815), the null hypothesis is rejected.
Problem 3:The table below gives the number of aircraft accidents that occurred during the
various days of the week. Test whether the accidents are uniformly distributed over the week.
Problem 4: Four coins are tossed 160 times and the following results were obtained.
Numbers of heads: 0 1 2 3 4
Observed frequencies: 17 52 54 31 6
Under the assumption that coins are balanced, find the expected frequencies of
getting 0,1,2,3 or 4 heads and test the goodness of fit.
x: 0 1 2 3 4 5 6
f: 275 72 30 7 5 2 1
Solution:
Expected frequencies are less than 5.
So, we pool adjacent categories to make it greater
than 5
Test for independence of attributes
The chi-square test can also be applied to test the association between attributes such as
honesty, smoking etc, when the sample data is presented in the form of a contingency
table with any number of rows and columns.
Contingency Table: A classification table containing m rows and n columns with observed
3 / 9
Stable Unstable
8
Males 60 30
Females 15 45
Solution: H0 : The nature of the work is independent of the gender of the worker.
H1 : The nature of the work is not independent of the gender of the worker.
Degrees of freedom =(No. of Rows- 1)*(No. of Columns-1)=(m− 1)(n− 1) = (2 − 1)(2− 1) = 1.
Level of significance = 5%
Table value of χ2 = 3.84
Contingency Table:
Stable Unstable Total
Males 60 30 90
Females 15 45 60
Total 75 75 150
Stable Unstable
Males 75×90/150=45 75×90/150=45
Females 75×60/150=30 75×60/150=30
χ2
The calculated value of χ2 is greater than the table value at 5% LS and 1 df.
Hence, we reject the null hypothesis.
• Problem 2:A tobacco company claims that there is no relationship between smoking and
lung ailments. To investigate the claim, a random sample of 300 persons in the age group
of 40 and 50 are given a medical test. The observed sample results are tabulated below
On the basis of this information, can it be concluded that smoking and lung ailments
are independent? ( 3.841 for 1 df)
Experiment
• An experiment is a means of getting an answer to the problem under consideration.
• Absolute experiment deals with determining the absolute value of some characteristic like
obtaining the average intelligent quotient of a group of people.
• Comparative experiment are designed to compare the effect of two or more objects on
some population characteristic.
Ex. Comparison of different kinds of varieties of crops.
Design of Experiment
Design of Experiments (DoE) is a statistical framework used to plan, conduct, and
analyze experiments so that we can determine the effect of one or more factors on a
response variable.
• Then there two variables involved directly here, the fertilizer and the yield of
wheat. These two variable are called the experimental variables.
• In addition, there are other variables also involved here : quality of seed, climate,
nature of soil etc.,. These variables are called the extraneous variable.
Aim of Design of Experiment
[Link]
Avoid bias by randomly assigning treatments.
2. Replication
Repeat experiments to estimate variability.
ANOVA can be used with data from experiments that have a single factor, or
independent variable, with more than two levels, or with data from experiments
that have multiple factors. It is a powerful and widely used tool for analyzing data
from designed experiments, and is often used in fields such as agriculture, biology,
engineering, and psychology.
Types of ANOVA
One-Way ANOVA
→ One factor (e.g., fertilizer type)
Two-Way ANOVA
→ Two factors (e.g., fertilizer + irrigation)
×Factorial ANOVA
→ Interaction effects included
×: Not in syllabus
Statistical analysis of CRD
• ANOVA is a technique used to test the means of more than
two samples. It divides the total variance in the group into
parts, which are associated to different factors. The
variation is split into two components as the variation
within subgroup and a variation between subgroups.
Solution:
Level of significance: 5%
Degrees of freedom:
• Numerator 𝑑𝑓1 = 2
• Denominator 𝑑𝑓2 = 9
Decision Rule
•If 𝐹𝑐𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒𝑑 > 𝐹𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 →Reject 𝐻0
•If 𝐹𝑐𝑎𝑙𝑐𝑢𝑙𝑎𝑡𝑒𝑑 ≤ 𝐹𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 →Do not reject 𝐻0