statistical inference and quality control

170
STATISTICAL INFERENCE AND QUALITY CONTROL (STA4C04) STUDY MATERIAL IV SEMESTER B.Sc. MATHEMATICS (2019 Admission) UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION CALICUT UNIVERSITY P.O. MALAPPURAM - 673 635, KERALA 19562

Upload: others

Post on 10-Feb-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

STATISTICAL INFERENCE AND QUALITY CONTROL

(STA4C04)

STUDY MATERIAL

IV SEMESTER

B.Sc. MATHEMATICS (2019 Admission)

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION

CALICUT UNIVERSITY P.O. MALAPPURAM - 673 635, KERALA

19562

School of Distance Education University of Calicut

Study Material

IV Semester

B.Sc. MATHEMATICS

(2019 Admission)

Complementary Course : STA4C04

STATISTICAL INFERENCE AND QUALITY CONTROL

Prepared by:

Dr. APARNA ARAVINDAKSHAN M., Assistant Professor, Department of Statistics, St. Joseph’s College, Devagiri.

Scrutinized by:

Ms. JEENA M.P., Assistant Professor, Department of Statistics, Thunjan Memorial Government College, Tirur.

DISCLAIMER

"The author(s) shall be solely responsible for the content and views

expressed in this book".

CONTENTS

1 Estimation Theory 1

1.1 Statistical Inference . . . . . . . . . . . . . . . . 1

1.2 Estimation of Parameters . . . . . . . . . . . . . 5

1.3 Point Estimation . . . . . . . . . . . . . . . . . . 7

1.4 Interval Estimation . . . . . . . . . . . . . . . . . 30

2 Testing of Hypothesis 49

2.1 Basic Concepts . . . . . . . . . . . . . . . . . . . 50

i

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

ii

2.2 Large Sample Tests . . . . . . . . . . . . . . . . . 62

2.3 Small Sample Tests . . . . . . . . . . . . . . . . . 76

2.4 Analysis of Variance (ANOVA) . . . . . . . . . . 101

3 Non-parametric Tests 115

3.1 Advantages and Disadvantages . . . . . . . . . . 116

3.2 Applications of Non-Parametric Test . . . . . . . 116

3.3 Test for Randomness . . . . . . . . . . . . . . . . 117

3.4 Problem of Location - Sign Test . . . . . . . . . . 120

3.5 Problem of Equality of two Populations . . . . . 127

3.6 Problem of Equality of Several Population Medians136

4 Quality Control 139

4.1 Basis of S.Q.C. . . . . . . . . . . . . . . . . . . . 141

4.2 Control Charts for Variables . . . . . . . . . . . . 152

4.3 Control Charts for Attributes . . . . . . . . . . . 158

REFERENCES 164

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

MODULE

ONE

Estimation Theory

1.1 Statistical Inference

Statistical inference is the branch of statistics which discussabout making inferences about the unknown aspects of the dis-tribution of the population based on a sample drawn from it.Alternatively, statistical inference deals with

1

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

2

1. methods for drawing conclusions about a population

2. and measuring the reliability of conclusions so obtained.

These conclusions and their measure of reliability is acquiredwith the help of sample data. The unknown aspects may be theform of the distribution, or the values of the parameter involvedin it, or both. In contrast with descriptive statistics, inferen-tial statistics assumes that data comes from a larger popula-tion. Whereas, descriptive statistics is merely concerned withthe properties of the observed data.

Basically, there are two types of statistical inference:

1. Parametric statistical inference.

2. Non-parametric statistical inference.

Parametric and Non-parametric Statistical In-

ference

In parametric statistical inference, it is assumed that the under-lying population distribution is known except for the parametersinvolved in it. Hence, making inferences on the population pa-rameter completely specifies the population distribution. On

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

3

the flip side, non-parametric statistical inference does not makeany such assumptions. The terminology ‘non-parametric’ doesnot mean that there is no parameter involved. It only meansthat making inferences on the population parameters does notcompletely specifies the population distribution.

Properties like central tendency, dispersion etc. of an under-lying probability distribution are of great interest as it describesthe population distribution. Whenever we talk about certaindistributions we associate with some parameters. For exampleN(µ, σ2), B(n, p), etc. These are important parameters for adistribution because if we looked at them carefully, we can seethat the mean and variance come from these parameters. Fornormal, the mean is µ and the variance is σ2. They are involvedin the p.d.f. of Normal distribution as parameters. For bino-mial, the mean is np and variance is np(1 − p). In this case,we can derive mean and variance from the parameters of thebinomial distribution. If we estimate the parameters of a dis-tribution, then we get a feel of the overall population. Mostparametric methods assume that:

1. Data is quantitative.

2. Population has a normal distribution.

3. Sample is sufficiently large.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

4

But in practice, that is not the case always. For example,

1. Data may be categorical or ordinal. To illustrate, considerthe scores of students in an examination. If marks are usedas scores, we have a quantitative data. But, in gradingsystem students having same grade is somewhat similarbut their marks are not equal, and we have categoricaldata. If ranking system is used, we know the positionof students, but the distance between 1st and 2nd rankwon’t be the same as that between 2nd and 3rd. That is,variables are natural ordered categories and the distancebetween the categories are not known.

2. Population size may be too small to be treated as normal.If the normal distribution is not appropriate, it is commonto consider the following possibilities:

(a) Transform data to normal when it is possible anduse normal methods to the transformed data. Bytransformation we mean, if a take a function of thedata, we may satisfy normality assumption.

(b) Use some other known non-normal distribution likeexponential distribution.

(c) Use non-parametric methods. It makes no assump-tions about the population distribution or the sam-

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

5

ple size. But, sometimes we may have a very generalassumption like the data is from a continuous distri-bution.

Basic tasks of statistical inference can be categorised as:

1. Estimation of a parameter

2. Testing of hypothesis

1.2 Estimation of Parameters

Estimation of parameters is a branch of statistical inferencewhich deals with estimating the values of the parameters basedon sample data. There are parametric and non-parametricmethods for estimating the parameters of a population. We willbe dealing with parametric methods only. Hence, we assumethat we have a random sample of observations generated froma population whose probability distribution is known, exceptfor the values of the parameters. The theory of estimation wasput forward by Prof. R.A. Fisher in his research papers around1930. Parametric estimation is classified into two under theheadings

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

6

1. Point estimation

2. Interval estimation

Parametric Space

The set of all admissible values of the parameters of probabilitydistribution is called the parametric space, denoted by Θ.

Example 1.2.1. For P (λ), Θ = {λ > 0}.

Example 1.2.2. For N(µ, σ2), Θ = (−∞,+∞)× (0,+∞).

Estimator and Estimate

A statistic T , used for estimating the population parameter iscalled an estimator. This statistic is used as a rule for calculatingan estimate of a given quantity based on observed data.

The numerical value taken by an estimator when a particularsample is realised is called an estimate.

That is, the term ‘estimator’ represents a rule (or statistic)used for estimating the unknown parameter and the estimaterepresents a specific value produced by the estimator.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

7

1.3 Point Estimation

If from the observations in a sample, a single value is calculatedas an estimate of the unknown population parameter, the proce-dure is referred to as point estimation and we refer to the valueof the statistic (estimator) as the point estimate. For example,if we use a particular value of the statistic X (say, x = 10 ) toestimate the mean µ of a population, we are using a point esti-mate of µ. Here X is referred to as an estimator and the specificvalue used for estimation, i.e. x = 10 is called the estimate ofµ.

Let X1 , X2 , . . . , Xnbe i.i.d. B(1, p) r.v.s. Then the following

are point estimators of p.

T1 = X

T2 = X1

T3 =X1 +X2

2

T4 =n∑

j=1

ajX

j, 0 ≤ a

j≤ 1

n∑j=1

aj

= 1

Hence, the problem of point estimation is to pick a statistic thatbest estimates the unknown parameter. Clearly, we would likethe estimator T of θ to be as close to θ as possible. Since T is

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

8

a statistic, the usual measure of closeness |T − θ| is also a r.v.Examples of such measures of closeness are:

(1) P (|T − θ| < ε) for some ε > 0

(2) E|T − θ|r for some r > 0

we want the first to be large and the second to be small.

Mean Square Error

When r = 2, the quantity defined in (2) is called the meansquare error and we denote it by

M.S.E.θ(T ) = E(T − θ)2

= E[T − E(T ) + E(T )− θ]2

= E[T − E(T )]2 + E[E(T )− θ]2

= V (T ) + (Bias)2

An estimator with small M.S.E. has small bias and variance.So, to control M.S.E. we need to control both variance and bias.

Various statistical properties of estimators can be used todecide which estimator is most appropriate in a given situation.That is, which estimator expose us to the smallest risk, which

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

9

will give us more information at the lowest cost and so on. Thereare four desirable characteristics of a good estimator. They are,

i) Unbiasedness

ii) Consistency

iii) Efficiency

iv) Sufficiency

Unbiasedness

An estimator is said to be unbiased, if the expected value of thestatistics is equal to the value of the parameter to be estimated.An estimator not having this property is called a biased esti-mator. This property ensures that, on an average the estimatorT has no systematic error; it neither over estimate nor underestimate θ, on an average.

Definition 1.3.1. Let X be a random variable (defined over apopulation) having the probability function f(x) and θ be the pa-rameter to be estimated. Let X1 , X2 , . . . , Xn

be a random sampletaken from the population. Let T = T (X1 , X2 , ...Xn

) be an esti-mator used to estimate θ. The estimator T is called an unbiased

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

10

estimator ifE(T ) = θ ∀ n.

E(T ) − θ is called the bias of the estimator T . Bias can bepositive, negative or zero.

Problems

1. Let X1 , X2 , . . . , Xnbe a r.s. taken from a population with

mean µ and let T = X. Check whether T is unbiased forµ.

2. Examine whether s2 = 1n

∑(Xi − X)2 is unbiased for σ2

if the population is N(µ, σ2).Note: As n→∞, (n−1)

n → 1. Hence, s2 is asymptoticallyunbiased for σ2.

3. Let X ∼ P (λ). A r.s. of size n is taken from X. LetT1 = X, T2 = X1 and T3 = 1

n−1

∑n

i=1(X

i− X)2. Check

whether T1 , T2 and T3 are unbiased for λ. Suggest anotherunbiased estimator for λ.Note:

(a) Unbiased estimator need not be unique.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

11

(b) Convex linear combination of unbiased estimator arealso unbiased estimators.

4. Let X ∼ N(µ, 1) and T = 1n

∑X2

i. S.T. T is unbiased for

µ2 + 1.

5. If T is an unbiased estimator of θ, S.T. T 2 and√T are

biased estimators of θ2 and√θ respectively.

Note: If T is an unbiased estimator of θ, then ψ(T ) is anunbiased estimator of ψ(θ) iff ψ is a linear function.

6. If X1 , X2 , . . . , Xn∼ B(1, p), S.T. T (T−1)

n(n−1) is an unbiasedestimator of p2, where T =

∑Xi .

7. S.T the sample mean is an unbiased estimator of 1θ for the

distribution f(x; θ) = θ(1− θ)x−1; x = 1, 2, . . .; 0 < θ < 1.

Consistency

One of the basic properties of a good estimator is that it providesincreasingly more precise information about the parameter θwith increase in the sample size n. Accordingly we have thefollowing definition of the consistency of an estimator.

Definition 1.3.2. A sequence of estimators Tn

will be calledconsistent for the parameter θ, if Tn converges to θ in probabil-

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

12

ity. i.e., for ε > 0,

limn→∞

P (|Tn− θ| ≤ ε) = 1

orlimn→∞

P (|Tn − θ| ≥ ε) = 0.

And we write Tn

P→ θ.

Consistency is a large sample property.

Theorem 1.3.1 (Sufficient condition for consistency).If Tn is a sequence of estimators such that E(Tn) → θ andV (T

n) → 0 as n→∞, then T

nis consistent for θ.

Proof. We have, E(Tn) → θ and V (T

n) → 0 as n → ∞. By

Chebychev’s inequality

P [|Tn − E(Tn)| > ε] ≤ V (Tn)ε2

.

Therefore,

P [|Tn− θ| > ε] → 0 as n→∞.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

13

Problems

1. S.T. sample mean X is a consistent estimator of popula-tion mean µ of an N(µ, σ2) population.

2. S.T. s2 = 1n

∑(Xi − X)2 is a consistent estimator of pop-

ulation variance in the case of an N(µ, σ2) population.

3. Let n be the number of Bernoulli trials, X the number ofsuccesses in a series of n trials with probability of successfor p for each trial. S.T. Xn is a consistent estimator for p.Note: LetX1 , X2 , . . . , Xn

be a r.s. of size n fromN(µ, σ2)and the statistic ‘sample median’ be denoted by M . Then,M → N(µ, π2

σ2

n ) as n→∞.

4. S.T. sample median is a consistent estimator of populationmean of a normal population.

5. S.T. nXn+1 is a consistent estimator of λ in P (λ).

Theorem 1.3.2. If Tn

is a consistent estimator of θ and γ(θ)a continuous function of θ, then γ(T

n) is a consistent estimator

of γ(θ).

Proof. We have P [|Tn− θ| < ε] → 1 as n→∞.

Since γ is a continuous function, for every ε > 0 however small,

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

14

there exists a positive number ε1 such that |γ(Tn) − γ(θ)| < ε1whenever |T

n− θ| < ε. That is,

|Tn− θ| < ε⇒ |γ(T

n)− γ(θ)| < ε1 .

For any 2 sets, A and B, if A⇒ B, then A ⊂ B; which impliesP (A) ≤ P (B). Therefore,

P [|γ(Tn)− γ(θ)| < ε1 ] ≥ P [|T

n− θ| < ε] → 1

n → ∞. That is, γ(Tn) P→ γ(θ). Hence, γ(T

n) is a consistent

estimator of γ(θ).

Result 1.3.1. If Tn

is consistent for θ, then Tn

+ an , a 6= 0

is consistent for θ. Therefore, consistent estimator need not beunique.

Efficiency

We know that

M.S.E.θ(T ) = V (T ) + (Bias)2.

So if we have to choose one among several unbiased estimatorsof a given parameter, we use the one whose sampling distribu-

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

15

tion has the smallest variance. Let T1 and T2 be two unbiasedestimators of a given parameter θ. If V (T1) is less than V (T2),T1 is said to be more efficient than T2 .

Definition 1.3.3. Let T1 and T2 be two unbiased estimators ofa given parameter θ. Suppose that E(T 2

1) <∞ and E(T 2

2) <∞.

We define the efficiency of T1 relative to T2 by

R.E.θ(T1 |T2) =

Vθ(T2)

Vθ(T1)

.

Note:

1. If R.E.θ(T1 |T2) > 1 then T1 is more efficient that T2 .

2. If R.E.θ(T1 |T2) = 1 then T1 and T2 are equally efficient.

3. If R.E.θ(T1 |T2) < 1 then T2 is more efficient that T1 .

Problems

1. P.T. in estimating the mean of a normal population, sam-ple mean is more efficient than the sample median.

2. X1 , X2 , X3 are 3 independent observations from a popula-tion with mean µ and variance σ2. If T1 = X1 +X2 −X3

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

16

and T2 = 2X1 + 3X2 − 4X3 are two estimators of µ, checkif T1 and T2 are unbiased estimators of µ and comparetheir efficiency.

3. S.T. for a sample of size n drawn from a normal pop-ulation with mean µ and variance σ2 the statistic µ =

1n+1

∑n

i=1X

iis the most efficient for estimating µ even

though it is biased.

4. Give examples of estimators which are

(a) Unbiased and efficient

(b) Unbiased and inefficient

(c) Biased and inefficient

Sufficiency

An estimator T is said to be sufficient for the parameter θ, if itprovides all the information contained in the sample in respectof estimating θ. Thus, if we know the value of the sufficientstatistic, then there is no need to know the individual samplevalues.

Definition 1.3.4. Let X1 , X2 , . . . , Xnbe a r.s. from a popula-

tion whose probability distribution is f(x) and θ be the parameter

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

17

to be estimated. Let T = T (X1 , X2 , ...Xn) be an estimator usedto estimate θ. The estimator T is said to be sufficient for θiff the conditional distribution of (X1 , X2 , . . . , Xn

) given T doesnot depend on θ, provided the conditional distribution exists.

Remark 1.3.1. Sample is always sufficient for θ. i.e.,(X1 , X2 , . . . , Xn

) is always sufficient for θ.

Remark 1.3.2. If T and Θ are vectors, we say that T is jointlysufficient for Θ.

Note: The sample mean x satisfies all the above four prop-erties when it is being used as an estimator for estimating thepopulation mean θ.

Problems

1. A r.s. of size 2 is taken from B(1, θ). S.T. X1 + X2 issufficient for θ.

2. If X1 and X2 are two i.i.d. P (λ) r.v.s. S.T. X1 + X2 issufficient for λ.

3. Let X1 , X2 , . . . , Xnbe i.i.d. B(1, p) r.v.s. S.T.

∑n

i=1X

i

and X are sufficient for p.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

18

Theorem 1.3.3 (Fisher - Neymann FactorisationCriterion or Theorem). Let X1 , X2 , . . . , Xn

be discreteor continuous r.v.s with joint probability density functionf(x1 , x2 , . . . , xn

; θ), θ ∈ Θ. Then T (X1 , X2 , . . . , Xn) is

sufficient for θ iff we can write

f(x1 , x2 , . . . , xn ; θ) = h(x1 , x2 , . . . , xn) gθ(T (X1 , X2 , . . . , Xn))

where h is a non-negative function of x1 , x2 , . . . , xnonly and

does not depend on θ and gθ

is a non-negative non-constantfunction of θ and T only.

That is, the density f can be factored into a product suchthat one factor ‘h’, does not depend on θ and the other factor‘g’, which does depend on θ, depends on X1 , X2 , . . . , Xn onlythrough T (X1 , X2 , . . . , Xn

).

Remark 1.3.3. Factorisation theorem leads to a sufficientstatistic, if a sufficient statistic exists.

Remark 1.3.4. The theorem cannot be used to show that agiven statistic T is not sufficient for θ. For this one would haveto use the definition of sufficiency.

Remark 1.3.5. If T is sufficient for θ, any 1-1 function of Tis also sufficient for θ.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

19

Note: The statistic T and the parameter θ may be multidi-mensional.

Problems

1. A r.s. of size 2 is taken from B(1, θ). S.T. X1 + X2 issufficient for θ using factorisation theorem.

2. If X1 and X2 are two i.i.d. P (λ) r.v.s. S.T. X1 + X2 issufficient for λ using factorisation theorem.

3. Let X1 , X2 , . . . , Xnbe i.i.d. B(1, p) r.v.s. S.T.

∑n

i=1X

i

and X are sufficient for p using factorisation criterion.

Minimal Sufficiency

There may be more than one sufficient statistic for a parameter.These are all reduced forms of the sample value. The maximumpossible form of reduction of sample values without loss of in-formation will lead to minimal sufficient statistic. That is, itcannot be reduced further without loss of information. A statis-tic T is said to be minimal sufficient, if it can be expressed as afunction of every other sufficient statistic.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

20

Completeness

Definition 1.3.5. Let X1 , X2 , . . . , Xnbe a r.s. from a popu-

lation with probability distribution f(x; θ). A statistic T (notnecessarily sufficient) is said to be complete iff

E[g(T )] = 0 ⇒ g(T ) = 0.

It is possible for a complete statistic to provide no informa-tion at all about θ (ancillary statistic). In order for completestatistics to be useful, they must also be a sufficient statistic. Asufficient statistic summarizes all of the information in a sampleabout a chosen parameter. Ideally then, a statistic should becomplete and sufficient, which means that: The statistic isn’tmissing any information about θ and doesn’t provide any irrel-evant information.

Likelihood Function

A random variableX is connected to the possible parameter θ bymeans of a function f(x; θ). For any given θ, f(x; θ) is intendedto be the probability (or probability density) of X. For anygiven x, on the other hand, f(x; θ) can be viewed as a function

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

21

of θ. This view f(x; θ) is called the ”likelihood function”. It hasa nice property of being continuously differentiable twice. Butthe area under curve of likelihood function does not have to addup to 1.

The likelihood function of n r.v.s X1 , X2 , . . . , Xn is de-fined to be the joint probability density function of n r.v.sf(x1 , x2 , . . . , xn

; θ) which is considered to be a function of θ.Let X be a r.v. and X1 , X2 , . . . , Xn

be a r.s. of X having thedensity functionf(x; θ). Also x1 , x2 , . . . , xn

are observed samplevalues. Then the likelihood function is defined by

L(θ;x1 , x2 , . . . , xn) = f(x1 , x2 , . . . , xn ; θ)

= f(x1 ; θ) f(x2 ; θ) . . . f(xn ; θ)

=n∏

i=1

f(xi ; θ)

Likelihood function is also denoted by L(X; θ) or L(θ). It givesthe likelihood that

Minimum Variance Unbiased Estimator

The unbiased estimator which have the least variance is calledminimum variance unbiased estimator (M.V.U.E.). Let A, B, C

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

22

and D be four estimators of the parameter θ whose distributionsare as in figure below.

We can see that A and C are unbiased and B and D arebiased, V (A) > V (C) and V (D) = 0. Event hough D has theleast variance, it is biased. An estimator which has the leastvariance is useless if it is not unbiased. So having just minimumvariance without unbiasedness is not an acceptable choice.

An unbiased estimator with least variance is most efficient.A natural question arises here is which is the unbiased estima-tor for a particular parameter with least variance? Is there anylower limit for the variance of an unbiased estimator for a par-ticular parameter etc. But it has been proved by Cramer andRao that there is a lower limit for the sampling variance of anyunbiased estimator. This is given by the Cramer-Rao inequality.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

23

Cramer-Rao Inequality

Let X be a random variable with density function f(x; θ). LetT be an unbiased estimator of some function of θ (ψ(θ)). Let

1. the limit of integration be independent of θ

2. differentiation under the integral sign or summation sign,according as the variable is continuous or discrete, is valid.

Then,

V (T ) ≥ [ψ′(θ)]2

I(θ),

where I(θ) is called the Fisher information about θ contained inthe sample given by

I(θ) = E

(∂ lnL∂θ

)2

= −E(∂2 lnL∂θ2

)= n E

(∂ ln f∂θ

)2

= −n E(∂2 ln f∂θ2

)

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

24

Minimum Variance Bound Estimator

When Cramer-Rao inequality becomes an equality, i.e.,

V (T ) =[ψ′(θ)]2

I(θ)= C.R.L.B.,

the Cramer-Rao lower bound , then T is called the minimumvariance bound unbiased estimator (M.V.B.U.E.). Also calledminimum variance bound estimator (M.V.B.E.). In this case,

∂ lnL∂θ

= A(θ)[T − ψ(θ)])

and V (T ) = ψ′(θ)A(θ) .

M.V.U.E. of a parameter need not be M.V.B.E. of that pa-rameter. Since it is not necessary that the minimum value ofthe variance attained by unbiased estimators of a parameter isthe C.R.L.B.

Problems

1. S.T. the sample mean X is the minimum variance boundestimator of µ when a r.s. of size n is taken from N(µ, σ2),

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

25

where σ is known.

2. S.T. for P (λ), sample mean X is the M.V.B.E. of λ. Alsoobtain the C.R.L.B.

Methods of Estimation

Appropriate statistics are to be identified for estimating the pa-rameters. There are different methods for estimating param-eters. The ones discussed here are the method of maximumlikelihood and methods of moments.

Method of Moments

This is the oldest method of estimation introduced by Karl Pear-son. To estimate the k parameters of a population, we equatethe first k moments of the population to the first k moments ofthe sample. Solving these k equations we get the k estimators.That is, by equating µ′

r= m′

r, for r = 1, 2, . . . , k and solving,

where µ′r

= E(Xr) and m′r

= 1n

∑n

i=1Xr

i.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

26

Properties

1. Moment estimators are asymptotically unbiased.

2. Moment estimators are consistent.

3. Under some general conditions, the distribution of mo-ment estimators are asymptotically normal.

Problems

1. Estimate λ by the method of moments for a P (λ) distri-bution.

2. Estimate µ and σ2 by the method of moments for aN(µ, σ2) distribution.

3. Estimate p by the method of moments in sampling froma B(N, p) population.

4. Estimate λ by the method of moments for a f(x;λ, α) =αλ

Γ(λ)xλ−1e−αx, x > 0.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

27

Method of Maximum Likelihood

Likelihood function gives the likelihood that the r.v. assumesa particular value x1 , x2 , . . . , xn

. The principle of maximumlikelihood estimation consists in finding the estimator of theparameter which maximises L(θ). Thus, if there exists a statisticT which maximises the L(θ) for variations in θ, then it is calledmaximum likelihood estimator (M.L.E.). That is, the value ofθ, as a function of x1 , x2 , . . . , xn

that maximises L(θ) will be theM.L.E. This can be obtained by solving

∂L

∂θ= 0 and if for that value of θ,

∂2L

∂θ2< 0.

The value of θ that maximises L(θ) will also maximise lnL(θ).So M.L.E. can also be obtained by solving

∂ lnL∂θ

= 0 and if for that value of θ,∂2 lnL∂θ2

< 0.

Properties

1. Maximum likelihood estimators are consistent.

2. Maximum likelihood estimators are most efficient.

3. Maximum likelihood estimators are sufficient, if sufficient

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

28

statistic exists.

4. Maximum likelihood estimators are asymptotically nor-mal.

5. Maximum likelihood estimators are not necessarily unbi-ased.

6. Maximum likelihood estimators are invariant under 1-1onto transformations.

Problems

1. Estimate λ by the method of maximum likelihood for aP (λ) distribution.

2. Estimate M.L.E. for random sampling from N(µ, σ2) pop-ulation

(a) for µ when σ2 is known.

(b) for σ2 when µ is known.

(c) for µ and σ2 simultaneously.

3. Find the M.L.E. of p in sampling from a B(N, p) popula-tion.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

29

4. Find the M.L.E. of α if f(x;α) = αe−αx, x > 0.

5. Find the M.L.E. of θ for a U(0, θ) population.

Method of Minimum Variance

Minimum-variance unbiased estimator (MVUE) or uniformlyminimum-variance unbiased estimator (UMVUE) is an unbiasedestimator that has lower variance than any other unbiased esti-mator for all possible values of the parameter. In this methodwe choose those estimators which are unbiased and have mini-mum variance. That is, if T

nis the estimator for θ, we should

have E(Tn) = θ and variance of T

nis minimum. If a complete

sufficient statistic exists, the UMVUE will be its function.

Method of Least Squares

In method of least squares we are finding a function of samplevalues X1 , X2 , . . . , Xn as an estimator of an unknown parameterin such a way that the sum of squares of the differences betweenthe values of the variable and the corresponding expected valuesbecome minimum. This method is mostly used in estimatingthe parameters of a linear function and will lead to beast linearunbiased estimators (BLUE).

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

30

Consider a r.s. X1 , X2 , . . . , Xn , of size n taken fromN(µ, σ2). We know E(X

i) = µ for all i. In this method we find

an estimator of µ such that∑

(Xi− E(X

i))2 =

∑(X

i− µ)2

is minimum. Using differential calculus we get X as the leastsquare estimator of µ.

1.4 Interval Estimation

In point estimation, sample data is used to obtain a single num-ber as an estimate of the unknown parameter. This value isexpectantly close to the unknown parameter. But, in generalthe estimate thus obtained will not coincide with the true valueof the parameter. In contrast to point estimation, in interval es-timation, sample data is used to obtain an interval within whichthe parameter is expected to lie with a certain degree of con-fidence. Hence, this interval is known as confidence interval orfiducial interval.

Suppose we want to obtain the confidence interval for someparameter θ of the population distribution. Here, the problemis to determine two constants t1 and t2 such that P (t1 < θ <

t2) = 1 − α. The values of t1 and t2 depends on the sampledata. Hence, their values will be different for different samples.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

31

In other words, the interval [t1 , t2 ] will be random interval. Someof these intervals will contain the true value of θ while the otherswon’t. The confidence coefficient (1−α) assertion that, in a longseries of independent sample of the same size, the frequency ofcases in which this interval will contain the true value of theparameter will be approximately 1−α. Accordingly, confidenceinterval is also known as 100(1− α)% confidence interval.

To give an example, if α = 0.01, the 99% confidence intervalmeans that, if 100 samples of the same size are considered toconstruct 100 confidence intervals, 99 of them will contain thetrue value of the parameter.

Confidence Interval for Mean

Let X1 , X2 , . . . , Xn be a r.s. of size n from N(µ, σ2).

Case I : σ is known

When σ is known Z = X−µσ√n

∼ N(0, 1). Then, from the area

property of standard normal distribution, the 100(1-α)% C.I.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

32

for µ is given by

P[|Z| ≤ zα

2

]= 1− α

i.e., P[−zα

2≤ Z ≤ zα

2

]= 1− α

i.e., P

[−zα

2≤ X − µ

σ√n

≤ zα2

]= 1− α

i.e., P

[−zα

2

σ√n≤ X − µ ≤ zα

2

σ√n

]= 1− α

i.e., P

[−X − zα

2

σ√n≤ −µ ≤ −X + zα

2

σ√n

]= 1− α

i.e., P

[X − zα

2

σ√n≤ µ ≤ X + zα

2

σ√n

]= 1− α

Therefore, the 100(1-α)% C.I. for µ is[X − zα

2

σ√n, X + zα

2

σ√n

].

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

33

Case II : σ is unknown and n is large

When σ is unknown and n is large Z = X−µS√n

∼ N(0, 1), where

S2 = 1n−1

∑n

i=1(Xi − X)2. Proceeding as above we get the

100(1-α)% C.I. for µ as[X − zα

2

S√n, X + zα

2

S√n

].

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

34

Case III : σ is unknown and n is small

When σ is unknown and n is small X−µS√n

∼ tn−1 . Now, by the

symmetry of t - distribution

P[|t| ≤ t

n−1, α2

]= 1− α

i.e., P[−t

n−1, α2≤ t ≤ t

n−1, α2

]= 1− α

i.e., P

[−t

n−1, α2≤ X − µ

S√n

≤ tn−1, α

2

]= 1− α

i.e., P

[−t

n−1, α2

S√n≤ X − µ ≤ t

n−1, α2

S√n

]= 1− α

i.e., P

[−X − t

n−1, α2

S√n≤ −µ ≤ −X + t

n−1, α2

S√n

]= 1− α

i.e., P

[X − t

n−1, α2

S√n≤ µ ≤ X + t

n−1, α2

S√n

]= 1− α

Therefore, the 100(1-α)% C.I. for µ is[X − t

n−1, α2

S√n, X + t

n−1, α2

S√n

].

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

35

Note:

1. Let X be the sample mean of a sample of size n from apopulation which is not normal whose mean is µ andvariance σ2. Then by CLT,

X → N

(µ,σ2

n

)as n→∞.

Then the 100(1-α)% C.I. for µ is[X − zα

2

σ√n, X + zα

2

σ√n

].

2. Here zα2

is obtained from the normal table in such a waythat the area under the normal curve to its right is equalto α

2 .

3. If α = 0.05, zα2

= 1.96, therefore, when σ is known, 95%

C.I. for µ is[X − 1.96 σ√

n, X + 1.96 σ√

n

].

4. If α = 0.02, zα2

= 2.326, therefore, when σ is known, 98%

C.I. for µ is[X − 2.326 σ√

n, X + 2.326 σ√

n

].

5. If α = 0.01, zα2

= 2.58, therefore, when σ is known, 99%

C.I. for µ is[X − 2.58 σ√

n, X + 2.58 σ√

n

].

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

36

Problems

1. Let X1 , X2 , . . . , Xnbe a r.s. of size 9 from N(µ, σ2). Ob-

tain the 97% C.I. for µ if X = 3.2 and σ2 = 2.

2. Let X = 80 be the sample mean of a r.s. of size 100 fromN(µ, σ2). Obtain the 96% C.I. for µ and σ = 2.

3. Let X1 , X2 , . . . , Xnbe a r.s. of size 34 from N(µ, σ2).

Obtain the 99% C.I. for µ if X = 43 and S = 3.

4. Let X = −2 be the sample mean of a r.s. of size 50 fromN(µ, σ2). Obtain the 96% C.I. for µ and S2 = 4.

Confidence Interval for the Difference of Means

Let X1 be the sample mean of a r.s. of size n1 from N(µ1 , σ21)

and X2 be the sample mean of a r.s. of size n2 from N(µ2 , σ22).

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

37

Case I : σ1 and σ2 are known

When σ1 and σ2 are known, X1 ∼ N

(µ1 ,

σ21n1

)and X2 ∼

N

(µ2 ,

σ22n2

). Therefore,

X1 − X2 ∼ N

(µ1 − µ2 ,

σ21

n1

+σ2

2

n2

)and

Z =(X1 − X2)− (µ1 − µ2)√

σ21n1

+σ22n2

∼ N(0, 1).

Then, from the area property of standard normal distribution,the 100(1-α)% C.I. for µ1 − µ2 is given by

P[|Z| ≤ zα

2

]= 1− α

i.e., P[−zα

2≤ Z ≤ zα

2

]= 1− α

i.e., P

−zα2≤ (X1 − X2)− (µ1 − µ2)√

σ21n1

+σ22n2

≤ zα2

= 1− α

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

38

i.e., P

[−zα

2

√σ2

1

n1

+σ2

2

n2

≤ (X1 − X2)− (µ1 − µ2)

≤ zα2

√σ2

1

n1

+σ2

2

n2

]= 1− α

i.e., P

[−(X1 − X2)− zα

2

√σ2

1

n1

+σ2

2

n2

≤ −(µ1 − µ2)

≤ −(X1 − X2) + zα2

√σ2

1

n1

+σ2

2

n2

]= 1− α

i.e., P

[(X1 − X2)− zα

2

√σ2

1

n1

+σ2

2

n2

≤ (µ1 − µ2)

≤ (X1 − X2) + zα2

√σ2

1

n1

+σ2

2

n2

]= 1− α

Therefore, the 100(1-α)% C.I. for (µ1 − µ2) is[(X1 − X2)− zα

2

√σ2

1

n1

+σ2

2

n2

, (X1 − X2) + zα2

√σ2

1

n1

+σ2

2

n2

].

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

39

Case II : σ1 and σ2 are unknown and n1 and n2

are large

When σ1 and σ2 are unknown and n1 and n2 are large

Z =(X1 − X2)− (µ1 − µ2)√

S21n1

+S2

2n2

∼ N(0, 1).

Proceeding as above we get the 100(1-α)% C.I. for µ as[(X1 − X2)− zα

2

√S2

1

n1

+S2

2

n2

, (X1 − X2) + zα2

√S2

1

n1

+S2

2

n2

].

Case III : σ1 = σ2 = σ is unknown and n1 and n2

are small

When σ1 = σ2 = σ is unknown and n1 and n2 are small

(X1 − X2)− (µ1 − µ2)√(n1−1)S2

1+(n2−1)S2

2n1+n2−2

(1n1

+ 1n2

) ∼ t(n1+n2−2) .

Let(n1 − 1)S2

1+ (n2 − 1)S2

2

n1 + n2 − 2=∗σ

2.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

40

Then(X1 − X2)− (µ1 − µ2)√

∗σ

2 (1n1

+ 1n2

) ∼ t(n1+n2−2) .

Proceeding as above the 100(1-α)% C.I. for µ1 − µ2 is given by

(X1 − X2)± tn1+n2−2, α

2

∗σ

√1n1

+1n2

.

Confidence Interval for Variance

Let X1 , X2 , . . . , Xn be a r.s. of size n from N(µ, σ2).

Case I : µ is unknown

When µ is unknown,

(n− 1)S2

σ2∼ χ2

(n−1).

By refereing χ2- table we can find χ2(n−1),1−α

2and χ2

(n−1), α2

suchthat

P[χ2

(n−1),1−α2≤ χ2 ≤ χ2

(n−1), α2

]= 1− α

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

41

i.e., P

[χ2

(n−1),1−α2≤ (n− 1)S2

σ2≤ χ2

(n−1), α2

]= 1− α

i.e., P

[χ2

(n−1),1−α2

(n− 1)S2≤ 1σ2

≤χ2

(n−1), α2

(n− 1)S2

]= 1− α

i.e., P

[(n− 1)S2

χ2(n−1),1−α

2

≥ σ2 ≥ (n− 1)S2

χ2(n−1), α

2

]= 1− α

i.e., P

[(n− 1)S2

χ2(n−1), α

2

≤ σ2 ≤ (n− 1)S2

χ2(n−1),1−α

2

]= 1− α

Therefore, the 100(1-α)% C.I. for σ2 is[(n− 1)S2

χ2(n−1), α

2

,(n− 1)S2

χ2(n−1),1−α

2

]

Case II : µ is known

When µ is known, ∑n

i=1(Xi − µ)2

σ2∼ χ2

(n).

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

42

Proceeding as above we get the 100(1-α)% C.I. for σ2 as[∑n

i=1(X

i− µ)2

χ2n, α

2

,

∑n

i=1(X

i− µ)2

χ2n,1−α

2

].

Confidence Interval for Proportion of Success

Population proportion is the fraction of the population that hascertain characteristic. Suppose that a population consists of Nunits of which X possesses a particular characteristic. Thenp = X

N is the fraction or proportion of units having that char-acteristic. Clearly, X ∼ B(N, p). In real life, we usually don’tknow facts about the entire population. So we use sample pro-portion to estimate p. This sample proportion is denoted byp′ = x

n , where n is the sample size (or the number of trials) andx is the number of units possessing the characteristic specifiedwithin the sample.

Now, as n increases and when neither p nor q = 1− p is toosmall, p′ = x

n → N(p, pqn

). Therefore,

Z =p′ − p√

p′q′

n

→ N(0, 1)

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

43

where p′ is the point estimate of p. By refereing to normal tablewe can find zα

2such that

P[|Z| ≤ zα

2

]= 1− α

i.e., P[−zα

2≤ Z ≤ zα

2

]= 1− α

i.e., P

−zα2≤ p′ − p√

p′q′

n

≤ zα2

= 1− α

i.e., P

[−zα

2

√p′q′

n≤ p′ − p ≤ zα

2

√p′q′

n

]= 1− α

i.e., P

[−p′ − zα

2

√p′q′

n≤ −p ≤ p′ + zα

2

√pq

n

]= 1− α

i.e., P

[p′ − zα

2

√p′q′

n≤ p ≤ p′ + zα

2

√p′q′

n

]= 1− α

Therefore, the 100(1-α)% C.I. for p is[p′ − zα

2

√p′q′

n, p′ + zα

2

√p′q′

n

].

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

44

Note:

1. If α = 0.05, zα2

= 1.96, therefore 95% C.I. for p is[p′ − 1.96

√p′q′

n , p′ + 1.96√

p′q′

n

].

2. If α = 0.02, zα2

= 2.326, therefore 98% C.I. for p is[p′ − 2.326

√p′q′

n , p′ + 2.326√

p′q′

n

].

3. If α = 0.01, zα2

= 2.58, therefore 99% C.I. for p is[p′ − 2.58

√p′q′

n , p′ + 2.58√

p′q′

n

].

Confidence Interval for Difference of Propor-

tions of Successes

Let p1 = x1n1

be the proportion of success of a r.s. of size n1

from B(N1 , p1) and p2 = x2n2

be the proportion of success ofa r.s. of size n2 from B(N2 , p2). Now, as becomes n1 and n2

becomes large and when p1 and p2 are neither too small nor toobig p′

1− p′

2∼ N

(p1 − p2 ,

p1q1n1

+ p2q2n2

). Hence,

Z =(p′

1− p′

2)− (p1 − p2)√

p′1q′1

n1+

p′2q′2

n2

→ N(0, 1),

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

45

where p′1

and p′2

are the point estimate of p1 and p1 respectively.By refereing to normal table we can find zα

2such that

P[|Z| ≤ zα

2

]= 1− α

i.e., P[−zα

2≤ Z ≤ zα

2

]= 1− α

i.e., P

−zα2≤

(p′1− p′

2)− (p1 − p2)√

p′1q′1

n1+

p′2q′2

n2

≤ zα2

= 1− α

i.e., P

[−zα

2

√p′

1q′1

n1

+p′

2q′2

n2

≤ (p′1− p′

2)− (p1 − p2)

≤ zα2

√p′

1q′1

n1

+p′

2q′2

n2

]= 1− α

i.e., P

[−(p′

1− p′

2)− zα

2

√p′

1q′1

n1

+p′

2q′2

n2

≤ −(p1 − p2)

≤ −(p′1− p′

2) + zα

2

√p′

1q′1

n1

+p′

2q′2

n2

]

= 1− α

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

46

i.e., P

[(p′

1− p′

2) + zα

2

√p′

1q′1

n1

+p′

2q′2

n2

≥ (p1 − p2)

≥ (p′1− p′

2)− zα

2

√p′

1q′1

n1

+p′

2q′2

n2

]

= 1− α

i.e., P

[(p′

1− p′

2)− zα

2

√p′

1q′1

n1

+p′

2q′2

n2

≤ (p1 − p2)

≤ (p′1− p′

2) + zα

2

√p′

1q′1

n1

+p′

2q′2

n2

]

= 1− α

Therefore, the 100(1-α)% C.I. for p1 − p2 is[(p′

1− p′

2)− zα

2

√p′

1q′1

n1

+p′

2q′2

n2

, (p′1− p′

2) + zα

2

√p′

1q′1

n1

+p′

2q′2

n2

].

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

47

Confidence Interval for Correlation Co-

efficient

Obtaining the confidence interval for Pearson’s r is a bit com-plicated as r does not follow the normal distribution. It has anegatively skewed distribution. Fisher’s Z-transform, by Prof.R. A. Fisher convert r into a distribution that is approximatelynormally distributed. That is, this transformation given by

Zr = 0.5 ln1 + r

1− r

is approximately normally distributed with mean µr =0.5 ln 1+ρ

1−ρ and standard error σr = 1√n−3

. Therefore,

Z =Zr − µr

σr

∼ N(0, 1)

Then, from the area property of standard normal distribution,the 100(1-α)% C.I. for r is given by

P[|Z| ≤ zα

2

]= 1− α

i.e., P[−zα

2≤ Z ≤ zα

2

]= 1− α

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

48

i.e., P

[−zα

2≤ Z

r− µ

r

σr

≤ zα2

]= 1− α

i.e., P[−zα

r≤ Z

r− µ

r≤ zα

r

]= 1− α

i.e., P[−Zr − zα

2σr ≤ −µr ≤ −Zr + zα

2σr

]= 1− α

i.e., P[Z

r− zα

r≤ µ

r≤ Z

r+ zα

r

]= 1− α

i.e., P

[Z

r− zα

r≤ 0.5 ln

1 + ρ

1− ρ≤ Z

r+ zα

r

]= 1− α

i.e., P

[a ≤ 0.5 ln

1 + ρ

1− ρ≤ b

]= 1− α

where, a = Zr − zα2

and b = Zr + zα2. Therefore, on simplifica-

tion we get,

P

[e2a − 1e2a − 1

≤ ρ ≤ e2b − 1e2b − 1

]= 1− α

Hence, the 100(1-α)% C.I. for ρ is given by[Zr − zα

r, Z

r+ zα

r

]

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

MODULE

TWO

Testing of Hypothesis

In practice it is not possible for a researcher to observe eachand every individual in a population. So, he/she may collect asample data and use it to answer questions about the popula-tion. Hypothesis testing is one such procedure to make infer-ences about the population.

The theory of testing statistical hypothesis deals with a spe-cial class of decision problems. Many important decisions made

49

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

50

in the face of uncertainty involve a choice between two alterna-tives. For example, an agronomist may have to decide whether anew variety of wheat developed by him will significantly improvethe yield or not. An industrial engineer may have to determinewhether the new production process will significantly reduce thecost or not. The sales manager of a soft drinks manufacturingcompany may have to choose between newspapers and televisionfor launching his advertisement campaign.

The persons entrusted with taking such decisions face therisk of making a wrong choice. Statistical techniques can be usedto evaluate or quantify such risks, and, if possible, to providecriteria for minimizing the chances of making wrong decisions.Such techniques fall into an area of statistics called ‘Testing ofHypothesis’.

2.1 Basic Concepts

Hypothesis

Hypothesis means a testable proposition or supposition. Impor-tant consideration after the formulation of the research problemis the construction of hypothesis.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

51

Statistical Hypothesis

Hypothesis about the nature of a statistical population is calleda statistical hypothesis. It can be either parametric or non-parametric.

Parametric Hypothesis

Parametric hypothesis is an assertion about the numerical valueof an unknown parameter, here, we assume that the functionalform of the distribution is known except the parameter or prob-ability distribution of the population. Example: Let X ∼ P (θ).Then H: θ = 3 or H: θ > 3 are parametric hypothesis.

Non-parametric Hypothesis

Non-parametric hypothesis is an assertion which involves nopopulation parameter. Unlike the parametric hypothesis, hereno assumptions about the underlying distribution is made. Non-parametric does not mean that there isn’t any parameter. Itsimply means that specifying the value of the parameter doesnot specifies the distribution. Example: H : The attributesobesity and food habits are independent or H : Median of a

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

52

population is 10.

Simple and Composite Hypothesis

If a statistical hypothesis completely specifies the probabilitydistribution it is referred to as a simple hypothesis, otherwisecomposite. Examples:

Distribution Simple CompositeP (λ) H: λ = 2.7 H: λ 6= 2.7 or

H: λ < 2.7 orH: λ > 2.7

B(10, p) H: p = 12 H: p 6= 1

2 orH: p < 1

2 orH: p > 1

2

B(n, p) H: p = 12 , n = 8 H: p = 1

2

(since n is unknown,specifying the value ofp alone will not specify

the distribution) orH: p > 1

2 , n = 8

Hence, a simple hypothesis specifies the numerical values ofall unknown parameters in the probability distribution of inter-est.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

53

Null Hypothesis

The hypothesis which is to be tested is known as the null hypoth-esis, denoted by H0 . Usually, it is a statement of no difference.

Alternative Hypothesis

The hypothesis which we accept when we reject the null hypoth-esis or we reject when we accept the null hypothesis is called analternative hypothesis, denoted by H1 or H

A.

Test of Hypothesis

A rule or procedure which enables us to decide whether to acceptor reject the null hypothesis or to determine whether observedsamples differ significantly from expected results are called testsof hypothesis or tests of significance. It assesses the evidenceprovided by data about some claim concerning a population.

Since the sample values x1 , x2 , . . . , xncan be taken as a point

in the n-dimensional space, we specify some region in the n-dimensional space and see whether this point lies within thisregion or not. Hence, tests of hypothesis partition the samplespace into two disjoint sets C and C ′ such that if the sample

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

54

belongs to C we reject H0 and if it belongs to C ′ we accept H0 .

Critical Region

The basis of testing of hypothesis is the partition of the samplespace into two exclusive regions, namely, the region of accep-tance of H0 and a region of rejection of H0 . This subset C ofthe sample space such that if the sample belongs to C, then H0

rejected is called critical region. In other words, set of all valuesof the test statistic for which H0 rejected is called critical region.It is denoted by ω.

Acceptance Region

The complement of the critical region in the sample space con-stitutes the acceptance region. That is, the values of the teststatistic for which H0 is accepted is called the acceptance region.

Test Statistic

The statistic based on whose value the null hypothesis is rejectedor accepted is called the test statistic or test criterion, denotedby ∆.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

55

In analogy to the above discussion we can say that, a testpartition the possible values of the test statistic into two parts.One corresponding to critical region and the other correspondingto acceptance region. The set of all values of the test statistic forwhich H0 rejected is called critical region and the values of thetest statistic for which H0 is accepted is called the acceptanceregion.

A test of statistical hypothesis is a two-action decision prob-lem. The actions being “rejecting the null hypothesis” or “ac-cepting the null hypothesis”. The decision is made based on thesample data.

Type I and Type II Errors

Since the decision to accept or reject H0 will be made based ondata derived from some random process, it is possible that anincorrect decision will be made. There are two types of errorsthat can be made if we use a test. Rejecting H0 when it is trueand accepting H0 when it is false.

DecisionTrue State

H0 H1

Reject H0 Type I Error Correct DecisionAccept H0 Correct Decision Type II Error

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

56

Probability of Type I Error

Rejection of the null hypothesis when it is true is called type Ierror. The probability of committing type I error is denoted byα. That is,

α = P (Type I error) = P (Rej H0 |H0 is true).

Probability of Type II Error

Acceptance of the null hypothesis when it is false is called typeII error. The probability of committing type II error is denotedby β. That is,

β = P (Type II error) = P (Acc H0 |H1 is true).

It would be ideal if we could find a test that simultaneouslyminimises both α and β. But this is not possible unless we areable to make the number of observations as large as we pleaseand in practice we are seldom able to do this. Since, α andβ are probabilities we know that α ≥ 0 and β ≥ 0. Supposeno matter what H0 and H1 states and what observed valuesoccur in the sample, we use the test: accept H0 . With this testwe could never commit type I error. For this test, α = 0 and

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

57

β = 1. Similarly, for the converse of this test: reject H0 , α = 1and β = 0. Neither of these tests is desirable, because theymaximise one of the two probabilities while minimising other.Hence, the procedure used in practice is to limit probability oftype I error to a pre-assigned level α that is small (usually 0.01or 0.05) and to minimise the probability of type II error.

Level of Significance

The fixed level of the probability of type I error is called the levelof significance. The significance level, denoted as α, is a measureof the strength of the evidence that must be present in yoursample before you will reject the null hypothesis and concludethat the effect is statistically significant. The significance levelor level of significance is the probability of rejecting the nullhypothesis when it is true. For example, a significance level of0.05 indicates a 5% risk of concluding that a difference existswhen there is no actual difference. Lower significance levelsindicate that you require stronger evidence before you will rejectthe null hypothesis. It is also called level of the test or size ofthe test or size of the critical region or producer’s risk. Theresearcher determines the significance level before conductingthe experiment.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

58

Best test

Among all the tests whose size is less than or equal to α, theone for which P(Type II error) is minimum is called the besttest.

Power of a Test

The probability of rejecting the null hypothesis H0 when thealternative hypothesis H1 is true is called power of the test orpower of the critical region. i.e.,

Power = P(rejecting H0 when it is not true)

= P(rejecting H0 when H1 is true)

= P(rejecting H0 |H1)

= 1− P(accepting H0 |H1)

= 1− P(type II error)

= 1− β

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

59

The larger the value of 1 − β for fixed α, the better is the testin general. Sensitiveness of a test is its ability to ascertain thecorrectness of the alternative hypothesis when it is true for fixedα. Thus, power is a measure of sensitiveness of the test.

Most Powerful Test

Among all the tests whose size is less than or equal to α, theone for which β is maximum is called the most powerful test.

Critical Value

The value of the test statistic which separates the critical re-gion and acceptance region is called critical value. It is usuallyreferred as ∆

α(Z

α, t

αetc.) depending on the sampling distri-

bution of the test statistic and the level of significance used. Itis also called the tolerance limit.

p-value

Traditionally the value of α is fixed as the maximum allowablevalue and then proceed to test the null hypothesis in terms of the

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

60

test statistic. The pre specified value of α sets the correspond-ing tolerance limit(s), i.e., critical value(s). If the calculatedvalue of the test statistic falls in the critical region correspond-ing to the critical value(s), we reject H0 . But, the tolerancelimit varies with α. Hence the decision may also changes withα. So, the question is which is the smallest value of α for whichH0 is rejected? The answer is P-value. P-value or probabilityvalue is the smallest value of α for which H0 is rejected. Thatis, for all alpha less than p, we accept the null hypothesis. Itis the observed level of significance corresponding to the ob-served value of the test statistic. That is, it is the probability,P (δ ∈ ω|H0 is true), where δ is the observed value of ∆ (teststatistic) and ω the critical region.

Steps Involved in Testing a Statistical Hypoth-

esis

1. State the null hypothesis H0 and alternative hypothesisH1 .

2. Choose the level of significance α.

3. Determine the test statistic.

4. Determine the probability distribution of the test statistic.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

61

5. Determine the best critical region.

6. Calculate the value of the test statistic.

7. If the calculated value of the test statistic falls in the crit-ical region reject the null hypothesis, otherwise accept it.

Neymann-Pearson Lemma

The best critical region or the most powerful critical region fortesting a simple H0 : θ = θ0 against the simple H1 : θ = θ1 ,is given by the well known Neymann Pearson Lemma. That is,the theorem specifies the critical region which has pre assignedprobability of type I error and a minimal probability of type IIerror. This is the same as maximizing the power subject to thecondition that probability of type I error is a pre determinedconstant (α).

Theorem 2.1.1. Let x1 , x2 , . . . , xnbe n independent observa-

tions from the population f(x, θ). We shall denote the likelihoodof these observations when H0 is true by L(x,H0) and whenH1 is true by L(x,H1). Let H0 : θ = θ0 against H1 : θ = θ1

be the test to be performed. Then the BCR is that for whichkL(x,H1) ≥ L(x,H0) inside it, where k is positive and is to bechosen such that the size of the critical region is α.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

62

Parametric Tests

2.2 Large Sample Tests

Standard test procedures are available to test the various hy-potheses regarding the parameters of the populations. Thesetests may be grouped into two.

i) large sample tests, and

ii) small sample tests.

For small sample tests, the exact sampling distribution ofthe test statistic should be known.

In large sample tests, the normal distribution plays the keyrole due to the central limit theorem. The theorem states that,when the sample size is large, most of the statistics are normallyor approximately normally distributed.

Let Y be a statistic satisfying the conditions of centra limittheorem. Then the statistic given by

Z =Y − E(Y )√

V (Y ).

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

63

For large n, Z ∼ N(0, 1). If Z is chosen as the test statistic, thecritical region for a given significance level can be determinedfrom the standard normal table. The test based on normaldistribution is called ‘normal test’ or ‘Z test’.

As an illustration, consider a situation in which we wantto test the null hypothesis H0 : θ = θ0 against the two sidedalternative H1 : θ 6= θ0 . Let θ be the estimate of θ. It appearsreasonable to accept the null hypothesis when θ is close to θ0

and to reject it when θ is much larger or much smaller the θ0 .Hence it is logical to let the critical region consists of both tailsof the sampling distribution of the test statistic. Such a test isreferred to as a ‘two tailed test’ or a ‘two sided test’.

If we are testing the null hypothesis H0 : θ = θ0 against theone sided alternative H1 : θ < θ0 , it would be reasonable toreject H0 only if θ is much smaller than θ0 . Since in this caseit would be logical to let the critical region consists of the lefthand tail of the sampling distribution of the test statistic.

Likewise, if we are testing the null hypothesis H0 : θ =θ0 against the one sided alternative H1 : θ > θ0 , it would bereasonable to reject H0 only if θ is much larger than θ0 . Sincein this case it would be logical to let the critical region consistsof the right hand tail of the sampling distribution of the test

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

64

statistic.

Any test where the critical region consist only one tail ofthe sampling distribution of the test statistic is called a ‘onetailed test’, particularly they are called ‘left tailed test’ and‘right tailed test’ respectively.

Best critical regions of normal test or Z - test

For the significance level α , to test H0 : θ = θ0 , the possi-ble alternatives and corresponding critical regions are as in thefollowing figure

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

65

and is summerised in the following table.

Alternative hypothesis Best Critical RegionH1 ω

θ < θ0 Z < −zα

θ > θ0 Z > zα

θ 6= θ0 |Z| ≥ zα/2

For example, when α = 0.05, the best critical regions areas follows.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

66

Test concerning mean of a population

By testing the mean of a population, we are actually testing thesignificant difference between the population mean and the sam-ple mean. In other words, we are deciding whether the sampleis drawn from the population having the mean proposed by thenull hypothesis H0 . Here, the null hypothesis to be tested is

H0 : µ = µ0

against one of the possible alternatives

1. H1 : µ < µ0 or

2. H1 : µ > µ0 or

3. H1 : µ 6= µ0

On the basis of a random sample of size n from a normal pop-ulation with known variance σ2. The test statistic is given by

Z =x− µ0

σ/√n

For the significance level α, the best critical regions are respec-tively,

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

67

1. Z < −Zα

2. Z > Zα

3. |Z| ≥ Zα/2

Using the sample data, calculate the value of the test statisticZ . If it lies in the critical region, reject H0 , otherwise acceptH0 .

Remark 2.2.1. If the population is given to be normal, the testprocedure is valid even for small samples, provided σ is known

Remark 2.2.2. When σ is unknown and n is large, in thecalculation of the statistic, we may replace σ by its estimate S,the sample S.D. That is,

Z =x− µ0

S/√n.

Example 2.2.1. A sample of 25 items were taken from a popu-lation with S.D. 10 and the sample mean is found to be 65. Canit be regarded as a sample from a normal population with mean=60, at 5% level of significance?

Solution: Given, n = 25, σ = 10, x = 65, µ0 = 60 andα = 0, 05.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

68

The null hypothesis to be tested is H0 : µ = 60 against H1 : µ 6=60.

Even though the sample is small (n < 30), σ is known.Therefore, the test statistic is

Z =x− µ0

σ/√n

=65− 6010/

√25

= 2.5

Since the alternative is of the form H1 : µ 6= 60, the bestcritical region is ω : |Z| ≥ Z

α/2 . Now, zα/2 = z0.025 = 1.96.

Therefore,

|Z| = |2.5| = 2.5 > 1.96 = zα/2

That is |Z| > zα/2 . Hence, H0 is rejected.

i.e., the sample can not be regarded as drawn from a normalpopulation with µ = 60.

Example 2.2.2. A new product was introduced in the marketclaiming that it has an average life of 200 hours with a standarddeviation of 21 hours. This clain came under severe criticismfrom dissatisfied customers. A customer group tested 49 items

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

69

and found that they have an average life of 191 hours. Is theclaim of the manufacturer justified?

Example 2.2.3. The mean life of a sample of 100 light bulbsproduced by a company is found to be 1570 hours, with a S.D.of 120 hours. Test the hypothesis that the mean life time ofall the bulbs produced by the company is 1600 hours against thealternative that it is not, at a level of significance of 0.05.

Example 2.2.4. A sample of 400 observations were taken froma population with S.D. 15. If the mean of the sample is 27, testwhether the hypothesis that the mean of the population is equalto 24 against that mean is less than 24. (α = 0.05)

Example 2.2.5. A random sample of 25 light bulbs has a meanlife of 2000 hours with a S.D. of 200 hours. Test at 1% levelthat the bulbs are taken from a lot having mean 2100 hours.

Test concerning difference of means of two pop-

ulations

By testing the equality of means of two normal populations,we are actually testing the significant difference between twosample means. Here, we are checking if the samples have comefrom two populations having the same mean. Here, we want to

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

70

test the null hypothesis

H0 : µ1 = µ2

against one of the alternatives

1. H1 : µ1 < µ2

2. H1 : µ1 > µ2

3. H1 : µ1 6= µ2 .

Based on independent random samples of sizes n1 and n2 fromtwo populations having the means µ1 and µ2 and the knownvariances σ1

2 and σ22, the test statistic is

Z =x1 − x2√σ1

2

n1+ σ2

2

n2

.

For the significance level α, the best critical regions (BCR)are respectively

1. Z < −Zα

2. Z > Zα

3. |Z| ≥ Zα/2

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

71

Calculate the value of the statistic Z using the sample informa-tion and if it lies in the critical region reject H0 , or otherwiseaccept H0 .

Remark 2.2.3. When we deal with independent random sam-ples from populations with unknown variances which may not benormal, we can still use the above test with S1 substituted forσ1 and S2 substituted for σ2 provided n1 and n2 are large.

Z =x1 − x2√S1

2

n1+ S2

2

n2

.

Example 2.2.6. Suppose that 64 students from college A and81 students from college B had mean heights 68.2” and 67.3”respectively. If the standard deviation for heights of all studentsis 2.43, is the difference between the two groups significant?

Example 2.2.7. A random sample of 1000 workers from fac-tory A shows that the mean wages were Rs.47 with a standarddeviation of Rs.23. A random sample of 1500 workers from fac-tory B gives a mean wage of Rs.30. Is there any significantdifference between their mean level of wages?

Example 2.2.8. Given in usual notations, n1 = 400, x1 = 250,s1 = 40 n2 = 400, x2 = 220, s2 = 55 Test whether the twosamples have come from populations having the same mean?

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

72

Test concerning the proportion of suc-

cess of a population

By testing population proportion of success, we mean the test-ing of the significant difference between population proportionof success and the sample proportion of success. Now let usfamiliarise the following notationsp : Population proportion of successp0 : The assumed value of p (proposed by H0)q0 = 1− p0

x : The number of successes in the samplen : Sample sizep′ : The proportion of success in the sample = x

n

Here, the null hypothesis to be tested is

H0 : p = p0

against one of the alternatives

1. H1 : p < p0

2. H1 : p > p0

3. H1 : p 6= p0 .

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

73

Based on a large sample of size n whose proportion of successis p′. The test statistic is

Z =p′ − p0√

p0q0n

For a given significance level , the BCR are respectively,

1. Z < −Zα

2. Z > Zα

3. |Z| ≥ Zα/2

Calculate the value of Z and if it lies in the critical region rejectH0 , or otherwise accept H0 .

Example 2.2.9. In a survey of 70 business firms, it was foundthat 45 are planning to expand their capabilities next year. Doesthe sample information contradict the hypothesis that 70% of thefirms are planning to expand next year. (Hint : Z= -1.04)

Example 2.2.10. In a die rolling experiment, getting 3 or 6is identified as a success. Suppose that 9,000 times the die wasrolled resulting in 3240 successes. Do you have reasons to believethat the die is an unbiased one?

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

74

Test concerning difference of two pop-

ulation proportions

By testing the difference of two population proportions, we aretesting the equality of two population proportions. In otherwords, we are deciding whether the two samples have come frompopulations having the same proportion of success. Let us con-sider the following notationsp1 : Proportion of success of the first populationp2 : Proportion of success of the second populationx1 : Number of successes in the first samplex2 : Number of successes in the second samplen1 : Size of first samplen2 : Size of second samplep′

1: Proportion of success in the first sample = x1

n1

p′2

: Proportion of success in the second sample = x2n2

Suppose we want to test the null hypothesis

H0 : p1 = p2

against one of the alternatives

1. H1 : p1 < p2

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

75

2. H1 : p1 > p2

3. H1 : p1 6= p2

Based on two independent random samples of sizes n1 and n2

with proportions of successes p1′ and p2

′ respectively.

The test statistic is

Z =p1′ − p2

′√p∗q∗

(1n1

+ 1n2

)where p∗ = n1p1

′+n2p2′

n1+n2and q∗ = 1− p∗.

For a given significance level α, the BCR are respectively

1. Z < −Zα

2. Z > Zα

3. |Z| ≥ Zα/2

Calculate the value of Z and if it lies in the critical region, rejectH0 or otherwise accept H0 .

Example 2.2.11. Before an increase in excise duty on tea, 800persons out of a sample of 1000 were found to consume tea. Af-ter an increase in the duty, 800 people out of 1200used to take

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

76

tea. Test whether there is significant decrease in the consump-tion of tea after the increase in the duty. (Hint : Z=6.816)

Example 2.2.12. In a sample of 600 men from city A, 450werefound to be smokers. Out of 900 from city B, 450 were smokers.Do the data indicate that the cities are significantly different withrespect to the smoking habit?

Example 2.2.13. Exercise 3 :A machine , in the long run,produces 16 defective items out of every 500 produced. After themachine is repaired, it produced 3 defective items in a batch of100. Has the machine improved its performance?

2.3 Small Sample Tests

If the sample size n is less than 30, it is called small sample.When the sample size is large, statistical validity of the test isinsured by central limit theorem. But, when the sample size issmall, as in most of the practical situations, the central limittheorem does not apply. So stricter assumptions on the popula-tion distributions is required to obtain statistical validity. Onecommon assumption is that the population under considerationis having normal probability distribution. For small samples,when the population is normal, the sampling distributions are

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

77

t, F and χ2.

Note 2.3.1. Notations:

S2 =1

(n− 1)

∑(x

i− x)2

s2 =1n

∑(x

i− x)2

t - tests

The test of hypothesis based on the Student’s t distribution iscalled t-test. The main applications of t-test are,

1. To test the significance of mean of a small sample from anormal population

2. To test the significance of the difference between the meansof two independent samples taken from two normal popu-lations.

3. To test the significance of the difference between the meansof two dependent samples taken from a normal population.

4. To test the significance of an observed correlation coeffi-cient.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

78

5. To test the significance of an observed regression coeffi-cient.

t- test for significance of population

mean

To test the mean of a population using Student’s t-test, thefollowing assumptions are made.

1. The parent population from which the sample is drawn isnormal.

2. The sample observations are independent and random.

3. The sample size should be small (i.e., n < 30).

4. The population standard deviation σ is unknown.

Note 2.3.2. When the population standard deviation is known,even if the sample size is small, X−µ0

σ/√n

still has the standardnormal distribution, as discussed in the previous section.

By testing the mean of a normal population, we are actuallytesting the significant difference between sample mean and the

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

79

hypothetical value of µ proposed by the null hypothesis. Inother words, we are testing whether the sample is drawn fromthe population with the hypothetical mean.

Here we are testing

H0 : µ = µ0

against one of the alternatives

1. H1 : µ < µ0

2. H1 : µ > µ0

3. H1 : µ 6= µ0

The test statistic is

t =x− µ0

S√n

∼ tn−1 .

Ort =

x− µ0s√n−1

∼ tn−1 .

For a given significance level, the BCR are respectively,

1. t < −tn−1,α

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

80

2. t > tn−1,α

3. |t| ≥ tn−1,α/2

Now calculate the value of t and compare it with the tablevalue of t for (n−1) degrees of freedom and a given significancelevel α.

Example 2.3.1. A sample of 10 observations gives a meanequal to 38 and SD 4. Can we conclude that the populationmean is 40? (Hint : t = -1.5)

Example 2.3.2. A random sample of size 16 has 53 as meanand the sum of squares of the deviations taken from the mean is

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

81

150. Can the sample be regarded as arisen from the populationwith mean 56.

Example 2.3.3. A sample of size 8 from a normal populationis 6,8,11,5,9,11,10,12. Can such a sample be regarded as drawnfrom a population with mean 7 at 2% level of significance?

Example 2.3.4. A personality test was conducted on a randomsample of 10 students from a University and the scores obtainedwere 35, 60, 55, 50.5, 44, 47.5, 41.5, 49, 53.5, 50. Test whetherthe average ”personality test score ”for the University studentsis 50 at 5% level?

t- Test concerning difference of means

of two populations

By testing the equality of two population means, we are decidingwhether the two samples are drawn from populations having thesame mean. Assumptions :

1. The two populations from which the samples are drawnfollow normal distributions.

2. The sample observations are independent and random

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

82

3. The sample sizes are small (n1 < 30, n2 < 30)

4. The two population variances σ12 and σ2

2 are equal butunknown.

Suppose we want to test the null hypothesis H0 : µ1 − µ2 = 0against one of the alternatives

1. H1 : µ1 < µ2

2. H1 : µ1 > µ2

3. H1 : µ1 6= µ2 .

Based on independent random samples of sizes n1 and n2 fromtwo populations. The test statistic is

t =x1 − x2√

(n1−1)S21+(n2−1)S2

2n1+n2−2

(1n1

+ 1n2

) ∼ tn1+n2−2 .

Ort =

x1 − x2√n1s

21+n2s

22

n1+n2−2

(1n1

+ 1n2

) ∼ tn1+n2−2

For the significance level α, the best critical regions (BCR)are respectively

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

83

1. t < −tn1+n2−2,α

2. t > tn1+n2−2,α

3. |t| ≥ tn1+n2−2,α/2

Here, tα

is obtained by referring the t- table for n1 + n2 − 2degrees of freedom. Calculate the value of the statistic t usingthe sample information and if it lies in the critical region rejectH0 , or otherwise accept H0 .

Example 2.3.5. The mean life of a sample of 10 electric bulbswas observed to be 1309 hours with a SD of 420 hours. A secondsample of 16 bulbs of a different batch showed a mean life of 1205hours with a SD of 390 hours. Test whether there is significantdifference between the means at 5% level. (Hint: t=0.619)

Example 2.3.6. A random sample of 16 men from state A hada mean height of 68 inches and sum of squares from the samplemean 132. A random sample of 25 men from state B had thecorresponding values 66.5 and 165 respectively. Can the samplesbe regarded as drawn from populations having the same mean?

Example 2.3.7. The following are samples from two indepen-dent normal populations. Test the hypothesis that they have thesame mean assuming that the variances are equal at 5% level ofsignificance.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

84

Sample 1 : 14,18,12,9,16,24,20,21,19,17Sample 2: 20,24,18,16,26,25,18.

t - test for dependent samples (Paired

t - test)

A situation similar to that discussed in the previous case occurswhen we have date obtained by observing the values of someattribute of different experimental units of the population, ob-served “before” and “after”. A typical case would be to measurea certain reaction on human subjects before (Xi) and after (Yi)some treatment. The purpose is to decide whether the treatmenthas some effect or not. Even though here we have the situationof two samples x1 , x2 , . . . xn

(values “before”) and y1 , y2 , . . . , yn

(values “after”), we can not apply the method discussed above.Such a procedure would be incorrect, since in the present case,the values (xi , yi) are not independent as they are observationson the same subject. However, under some assumptions, we canuse here one sample t-test. Imagine that the observations aresuch that the differences d

i= x

i− y

i, i = 1, 2, . . . n have the

same normal distribution with means µ and variance σ2. Thevalues x

ior y

iseparately need not be normally distributed. Now

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

85

we test the null hypothesis

H0 : µ = 0

against one of the alternatives

1. H1 : µ < 0

2. H1 : µ > 0

3. H1 : µ 6= 0

The test statistic is

t =dS

d√n

,

where d =∑d

i

n and Sd

=√

1(n−1)

∑(di − d)2.

Or

t =ds

d√n−1

,

where d =∑d

i

n and sd

=√

1n

∑(d

i− d)2. For a given signifi-

cance level α, the best critical regions are respectively,

1. t < −tn−1,α

2. t > tn−1,α

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

86

3. |t| ≥ tn−1,α/2

Here, tα

is obtained by referring the t- table for n−1 degrees offreedom. Now calculate the value of the statistic and if lies inthe critical region, reject the null hypothesis otherwise acceptnull.

Example 2.3.8. To test the efficiency of sleeping tablets, a drugcompany uses a sample of insomniacs. The time in minutesuntil falling asleep is observed for each of them. Few days later,the same persons are given a sleeping tablet and the time untilfalling asleep is observed again. The measurements are givenbelow.

Persons A B C D ENo tablet 65 35 80 40 50

With tablet 45 15 61 31 20

Test whether the sleeping tablets are effective. (Hint: t=5.89)

Example 2.3.9. A certain stimulus administered on each of 10patients resulted in the following changes in blood pressure. 5,2, 8, -1, 3, -2, 1, 5, 4, 6. Can it be concluded that the stimuluswill be in general accompanied by an increase in blood pressure?

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

87

Testing the Correlation Coefficient

The correlation coefficient tells us about the strength and di-rection of the linear relationship between x and y, where thevariables x and y are in interval or ratio scale. We perform ahypothesis test of the “significance of the correlation coefficient”to decide whether the linear relationship in the sample data isstrong enough to use to model the relationship in the popu-lation. The hypothesis test lets us decide whether the valueof the population correlation coefficient ρ is “close to zero” or“significantly different from zero”. We decide this based onthe sample correlation coefficient r and the sample size n. Let(x1 , y1) , (x2 , y2) , . . . , (xn

, yn) be a random sample of size n from

a bivariate normal population. To test the null hypothesis

H0 : ρ = 0

against one of the alternatives

1. H1 : ρ < 0

2. H1 : ρ > 0

3. H1 : ρ 6= 0

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

88

The test statistic is

t =r√

(n− 2)√1− r2

∼ tn−2 ,

where r is the sample correlation coefficient. For the significancelevel alpha the best critical regions are respectively

1. t < −tn−2,α

2. t > tn−2,α

3. |t| ≥ tα/2,n−2

When the sample is large,

Z =r√

(n− 2)√1− r2

∼ N(0, 1)

and the critical regions can be obtained from normal table.

Example 2.3.10. A scientist suspect that a person’s stress levelchanges so does the amount of his or her impulse buying. Totest this hypothesis, he took a sample of size n = 72 and foundthat r = 0.38. Test the hypothesis that this is suggestive of thestudents suspicion?

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

89

Example 2.3.11. Test for the significance of correlation coef-ficient at 5% level of significance if the sample of size n = 27gives a sample correlation coefficient of 0.6.

Example 2.3.12. Consider a population consisting of all mar-ried couples, and we want to investigate whether people tend tomarry partners of about same age. The following table givesages of 12 couples. Couple No. 1 2 3 4 5 6 7 8 9 10 11 12Husband’s Age 30 29 36 72 37 36 51 48 37 50 51 36 Wife’sAge 27 20 34 67 35 37 50 46 36 42 46 35 Test whether there isa positive correlation between husband’s and wife’s age. (Hint:r=0.969, t=12.4028)

Example 2.3.13. The following table gives data on day timetemperature (in F) and hot chocolate sale (in $) for a smallsnack shop during 9 youth soccer matches in 2002 Match No. 12 3 4 5 6 7 8 9 Temperature 51 60 65 71 39 32 81 76 66 Sale187 210 137 136 241 262 110 143 152 Test whether there is anegative correlation between temperature and hot chocolate sale.(Hint: r=-0.946, t=-1.895)

Chi-square Test for Population Variance

This test is conducted when we want to test if the given normalpopulation has a specified variance, say σ2

0. Chi square test for

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

90

variance is generally a right tailed test. Here we are testing

H0 : σ2 = σ02

againstH1 : σ2 > σ0

2

The test statistic is

χ2 =ns2

σ20

or

χ2 =(n− 1)S2

σ20

For a given significance level α, the BCR is

ω : χ2 > χα

2,

where χα2 is obtained by referring the chi square table for n−1

d.f. and a for a given significance level α.

Calculate the value of the statistic and if it lies in the criticalregion reject the null hypothesis, otherwise accept the null.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

91

Problems

1. A manufacturing process is expected to produce goodswith a specified weight with variance less than 5unts. Arandom sample of 10 was found to have variance 6.2 units.Is there reason to suspect that the process variance hasincreased?

2. A farmer surveyed 4 plots of land and found the followingyields. 1269,1271,1263,1265. He believes that his produc-tion have a SD of 2. Test at 5% level whether his data isconsistent with his supposition.

F Test for Equality of Two Population Vari-

ances

This test is used for testing the equality of variances (or stan-dard deviations) of two normal populations. Draw a randomsample of size n1 from N

(µ1 , σ1

2)

and a sample of size n2 fromN

(µ2 , σ2

2). Let S1

2 and S22 be their sample variances. Here

we want to testH0 : σ1

2 = σ22

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

92

againstH1 : σ1

2 > σ22.

The test statistic is

F =S2

1

S22

∼ F(n1−1)(n2−1) .

For a given significance level α, the best critical region is givenby

ω : F > Fα,

where Fα

is obtained by referring F- table for (n1 − 1, n2 − 1)degrees of freedom. Calculate the value of the test statisticand if it lies in the critical region reject the null hypothesis ,otherwise accept the null.

Notes :

1. Before starting the F test, compute S21

and S22. Take the

larger value as the numerator in the F ratio and n1 corre-sponds to the value in the numerator.

2. If the required F value is not plotted in the table, inter-polate between the available values to determine the tablevalue.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

93

3. The test statistic can also be written in the form

F =

n1s21

n1−1

n2s22

n2−1

∼ F(n1−1)(n2−1) .

Problems

1. Sample of sizes 10 and 18 taken from two normal popula-tions gave s1 = 14 and s2 = 20. Test the hypothesis thatthe samples have come from populations with the samestandard deviation.

2. The random samples of sizes 8 and 11 drawn from twonormal populations are characterized as follows.Sample size Sum of obs. Sum of squares of obs.

8 9.6 61.5211 16.5 73.26

Examine whether the two samples came from populationshaving the same variance.

3. In an animal feeding experiment, the following results werenoted.Diet Gain in weightHigh protein X 13,14,10,11,12,16,10,8,11,12,9,12Low protein Y 7,11,10,8,10,13,9

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

94

Test the equality of variances in weight gain due to thetwo diets.

Chi-square test for goodness of fit

Consider a set possible events 1, 2, 3, ..., n arranged in ’n’ classesor cells. Let these events occur with frequencies O1 , O2 , . . . , On

called ’observed frequencies. Let them be expected to occur withfrequencies E1 , E2 , . . . , En called the ’expected frequencies. Theexpected frequencies are calculated on the assumption that thedata obeys a certain probability distribution such as binomial,normal etc. We test the hypothesis that the assumed probabilitydistribution fits good for the given data against the alternativethat it is not. A measure of disagreement existing between theobserved and expected frequencies can be found by using thechi square test statistic given by

χ2 =n∑

i=1

(Oi − Ei)2

Ei

If χ2 = 0, the observed frequencies and the expected frequencieswill coincide, and this shows that there is perfect agreementbetween theory and observation. When the value computed

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

95

from the data exceeds limit, we reject H0 . Thus the chi squaretest for goodness of fit is basically a right tailed test. The bestcritical region is χ2 > χ

α2 , where χ

α2 is obtained by referring

the chi square table for (n−1) degrees of freedom. Now calculatethe value of the test statistic and if lies in the critical region,reject H0 or otherwise.

The following points to be considered while conduction thistest. If we have to estimate the parameters like ’p’ (for binomialdistribution) or λ (for Poisson distribution), to compute theexpected frequencies, then one or more degrees of freedom hasto be subtracted for each parameter estimated. If any of theexpected cell frequency is less than 5, then we combine (pool)it with the preceding or succeeding cell frequency, so that theresulting frequency is greater than 5. In this case also, onedegrees of freedom has to be adjusted.

Problems

1. Four coins are tossed 80 times. The distribution of numberof heads is given below.

No. of heads : 0 1 2 3 4Frequency : 4 20 32 18 6

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

96

Apply chi square test at 1% level to test whether the coinsare unbiased. (Value of statistic=0.73)

2. The demand for refrigerators in a city are found to varyday by day. In a study. the following data were obtained.Test at 5% level of significance whether the demand de-pends on the day of the week.

Days : Mon Tue Wed Thur Fri SatDemand : 115 126 120 110 125 124

3. Fit a Poisson distribution for the following data and testfor goodness of fit.

X : 0 1 2 3 4 5 6F : 275 72 30 7 5 2 1

Chi - square test for independence of attributes

Let there be two attributes A and B, ‘A’ divided into ‘m’ classesA1 , A2 , . . . Am

and ‘B’ divided into ‘n’ classes B1 , B2 , . . . Bn.

The various cell frequencies can be expressed as in the followingtable, having ‘m’ rows and ‘n’ columns.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

97

A \ B B1 B2 . . . Bj

. . . Bn

TotalA1 f11 f12 . . . f1j . . . f1n f1.

A2 f21 f22 . . . f2j. . . f2n

f2.

......

......

......

......

Ai

fi1 f

i2 . . . fij

. . . fin

fi.

......

......

......

......

Am

fm1 f

m2 . . . fmj

. . . fmn

fm.

Total f.1 f.2 . . . f.j . . . f.n N = f..

Here,fij - frequency of the occurrence of the joint event (Ai , Bj )f

i.- frequency of occurrence of the event A

i

f.j

- frequency of occurrence of the event Bj

Such a table is called m × n contingency table. We test thehypothesis H0 that the attributes A and B are independent.That is, there is no association between A and B. If H0 is true,we have,

P(A

i, B

j

)= P (A

i) P

(B

j

)i.e.,

fij

N=fi.

Nxf.j

N.

Hence,

fij

=fi.f.j

N

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

98

The test statistic is given by

χ2 =m∑

i=1

n∑j=1

(O

ij− E

ij

)2

Eij

The BCR is given by χ2 > χ2α

, where χ2α

is obtained byreferring the chi square table for (m− 1)(n− 1) degrees of free-dom. Calculate the value of the statistic and if lies in the criticalregion, reject the null hypothesis.

Problems

1. From the following table on some horticultural data, testthe hypothesis that the flower colour is independent of thenature of leaves. Leaves Flowers

White flowers Red flowersFlat leaves 99 20

Curled leaves 36 5

(Hint : χ2 = 0.249)

Note 2.3.3. For a 2× 2 contingency table, where the cell

frequencies area bc d

the calculated value of chi square

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

99

is given by,

χ2 =N (ad− bc)2

(a+ b) (c+ d) (a+ c) (b+ d),

where N = a+ b+ c+ d.

2. Consider the following 2× 2 contingency table.A1 A2

B1 7 1B2 6 8

Apply chi square test at 5% level to test whether the twoattributes A and B are independent.

Yates’ Correction

Yates’ correction was proposed by F.Yates in 1934. Wehave learnt that no expected cell frequency should be lessthan 5 for applying chi square test. This is because, whenthe expected frequencies are less than 5, the chi squaretable values are not very reliable, especially for 1 degreeof freedom.

However, if chi square test is applied after consideringYates’ correction, we will get a reduced chi square value.Sometimes, the difference between the chi square value

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

100

with and without Yates’ correction is so much that it leadsto a totally different conclusion.

Consider the 2x2 contingency tablea bc d

With Yates’ correction, the calculated chi square becomes

χ2 =N

(|ad− bc| − N

2

)2

(a+ b) (c+ d) (a+ c) (b+ d),

3. Consider the previous example and test the independenceof attributes with Yates’ correction

4. In an experiment on immunization, of human beings, thefollowing results were obtained. Draw your inference onthe efficiency of the vaccine at 5% level.

Died SurvivedVaccinated 2 10

Not vaccinated 6 4

5. A driving school examined the result of 200 candidateswho were taking their test for the first time. They foundthat out of 90 men, 52 passed and out of 110 women 59passed. Do these data indicate at 1% level of significancethat a relationship between gender and the ability to pass

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

101

the test for the first time?

2.4 Analysis of Variance (ANOVA)

(Test for equality of several population means)

Test of significance of the difference between 2 sample meansis based on t-distribution. But when we have three or more sam-ples to consider at a time this procedure is inadequate. There-fore, for testing the hypothesis that all the samples are drawnfrom the same population, i.e., they have the same mean thetechnique of ANOVA is used.

The variation present in a set of observations under studymay be caused by known and unknown factors. Variations dueto unknown factors are known as random variations. In analysisof variance, an attempt is made to separate the variation due toknown factors from the variation due to unknown factors. Forthis, the total variance present in the whole set of observationsis partitioned into a number of component variances caused byeach set of independent factors. If the component variances donot differ significantly, it is concluded that the effects of all thefactors are equal.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

102

Assumptions:

1. Observations yij

’s are independent and random.

2. Parent populations are normal with common variance σ2

3. Different effects are additive in nature.

4. Error component follows N(0, σ2)

One-Way Classification

In one-way classification, observations are classified based on asingle criterion. For example, suppose we want to study theeffect of a variable, say fertilizer, in the yield of a crop. So, weapply different fertilizers on different fields and try to find outthe difference in the effect of these fertilizers on yield. Supposewe apply k fertilizers. Hence, we get k samples each of themdrawn from these k populations. (The different populationshere, are the fields where different fertilizers are applied). Herethe only one variable is the ‘fertilizer, which is the criterion forclassification.

Let us suppose that N observations yij

, (i = 1, 2, . . . n; j =1, 2, . . . n

i) of a random variable Y are grouped on some basis

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

103

into k classes of sizes n1 , n2 , . . . , nk, N =

∑k

i=1ni as exhibited

in the table below.

Class/ Sample Observations TotalTreatment

1 y11 y12 . . . y1n1T1

2 y21 y22 . . . y2n2T2

......

......

...i y

i1 yi2 . . . y

inj

Ti

......

......

...k y

k1 yk2 . . . y

knk

Tk

Grand Total G

This scheme of classification according to 1 factor or criterionis called one-way classification and its analysis is called one-wayANOVA.

The total variation in the observations yij

can be split intotwo components.

1. Variation between the classes or variation due toassignable causes (different bases of classification), com-monly known as treatments. This can be detected andcontrolled.

2. Variation within the classes or variation due to chance

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

104

causes. This cannot be controlled.

Mathematical model for one-way classification

Any observation belonging to the collected data has three com-ponents, namely general mean effect, effect of the fertilizer andthe effect of unknown factors. i.e.,

yij = µ+ αi + εij

where yij

is any observation, µ is the general mean effect, αi

is the effect of ith treatment and εij

is the effect of unknownfactors.

The null hypothesis is:

H0 : All the treatment means are homogeneous

That is,H0 : µ1 = µ2 = . . . = µ

k

The main objective of ANOVA technique is to examine ifthere is significant difference between the class means in view ofthe inherent variability within the separate classes. The nameANOVA is derived from partitioning of total variability into its

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

105

component parts.

The total sum of squares (T.S.S.),

T.S.S. =k∑

i=1

ni∑

j=1

yij − y..

is used as an overall measure of variability in data. Intuitively,this is reasonable because, if we were to divide T.S.S. by the cor-responding degrees of freedom N −1, we would have the samplevariance. Sample variance is of course a standard measure ofvariability. T.S.S. is partitioned as follows:

T.S.S. = S.S.Tr. +S.S.E.

Where, S.S.Tr is the S.S. due to treatments, i.e., between treat-ments or classes And S.S.E. is the S.S. due to error, i.e., withintreatments or classes. The degrees of freedom (d.f.) due tovarious sum of squares are as follows:

S.S. d.f.T.S.S. N − 1S.S.Tr. k − 1S.S.E. N − k

Note 2.4.1. N − 1 = (k − 1) + (N − k)

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

106

Mean Sum of Squares (M.S.S.):

The S.S. divided by its corresponding degrees of freedom givesthe corresponding variance or the M.S.S.. Thus,

M.S.T. =T.S.S.N − 1

M.S.Tr. =S.S.Tr.k − 1

M.S.E. =S.S.E.N − k

Note 2.4.2. M.S.T.6= M.S.Tr. + M.S.E.

The M.S.E. is always an unbiased estimator of σ2. i.e.,

E(M.S.E.) = σ2

Under H0 , M.S.Tr. is an unbiased estimator of σ2. i.e.,

E(M.S.Tr.) = E(M.S.E.) = σ2, under H0

Otherwise,E(M.S.Tr.) > E(M.S.E.)

The test statistic is given by the variance ratio

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

107

F =M.S.Tr.M.S.E.

∼ Fk−1,N−k

.

Under H0 , F = 1, otherwise F > 1. So, smaller values ofF support H0 and larger values of F support H1 . Hence, thecritical region is

F > Fα .

ANOVA Table

Sources of S.S. d.f. MS.S. F -ratioVariation

F = M.S.Tr.M.S.E.Treatment S.S.Tr. k − 1 M.S.Tr. = S.S.Tr.

k−1

Error S.S.E. N − k M.S.E. = S.S.E.N−k ∼ F

k−1,N−k.

Total T.S.S. N − 1

Calculation of Various Sum of Squares

Correction Factor, C.F. =G2

N

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

108

T.S.S. = Sum of squares of all observations− C.F.

=k∑

i=1

ni∑

j=1

y2ij− C.F.

S.S.Tr. =(T1)

2

n1

+(T2)

2

n2

+ . . .+(T

k)2

nk

− C.F.

S.S.E. = T.S.S.− S.S.Tr.

Two-Way Classification

Suppose N observations are classified into k categories, sayA1 , A2 , . . . , Ak

according to some criterion A; and into h cate-gories, say B1 , B2 , . . . , Bh

according to some criterion B, havingkh combinations (Ai , Bj ), i = 1, 2, . . . , k; j = 1, 2, . . . , h; oftencalled cells. The number of observations in each cell may beequal or not, but we shall consider the case of one observationper cell, so that N = kh (i.e., total number of cells is N = kh),as shown in the table below.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

109

Criterion B 1 2 . . . j . . . h Row TotalCriterion A

1 y11 y12 . . . y1j . . . y1hR1

2 y21 y22 . . . y2j. . . y2h

R2

......

......

......

i yi1 y

i2 . . . yij

. . . yih

Ri

......

......

......

k yk1 y

k2 . . . ykj

. . . ykh

Rk

Column Total C1 C2 . . . Cj

. . . Ch

G

This scheme of classification according to 2 factors or cri-terion is called two-way classification and its analysis is calledtwo-way ANOVA. In two-way classification, the values of theresponse variable are affected by two factors.

The total variation in the observations yij

can be split intothree components.

1. Variation between the rows or variation due to criterionA.

2. Variation between the columns or variation due to crite-rion B.

3. Variation within the classes or variation due to chancecauses. This cannot be controlled.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

110

Mathematical model for two-way classification

An observation chosen from the collected data has four compo-nents namely general mean effect, effect of the column variable,effect of the row variable and the effect of unknown factors. i.e.,

yij = µ+ αi + +βj + εij

where yij is the observation in ijth cell, µ is the general meaneffect, α

iis the effect of A

irow, β

jis the effect of factor B

j

column and εij

is the effect of unknown factors.

The null hypothesis is:

H0A: Criterion A (Row) means are homogeneous

That is,H0A

: µA1 = µ

A2 = . . . = µAk

H0B: Criterion B (Column) means are homogeneous

That is,H0B

: µB1 = µ

B2 = . . . = µBh

T.S.S. is partitioned as follows:

T.S.S. = S.S.A.+ S.S.B.+ S.S.E.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

111

where, S.S.A. is the S.S. due to criterion A (i.e., the row S.S.),S.S.B. is the S.S. due to criterion B (i.e., the column S.S.), andS.S.E. is the S.S. due to error. The degrees of freedom (d.f.)due to various sum of squares are as follows:

S.S. d.f.T.S.S. kh− 1S.S.A. k − 1S.S.B. h− 1S.S.E. (k − 1)(h− 1)

Note 2.4.3. kh− 1 = (k − 1) + (h− 1) + (k − 1)(h− 1))

Mean Sum of Squares (M.S.S.)

The S.S. divided by its corresponding degrees of freedom givesthe corresponding variance or the M.S.S.. Thus,

M.S.T. =T.S.S.kh− 1

M.S.A. =S.S.A.k − 1

M.S.B. =S.S.B.h− 1

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

112

M.S.E. =S.S.E.

(k − 1)(h− 1)

Note 2.4.4. M.S.T.6= M.S.A. + M.S.B. + M.S.E.

The M.S.E. is always an unbiased estimator of σ2. i.e.,

E(M.S.E.) = σ2

Under H0A, M.S.A. is an unbiased estimator of σ2. i.e.,

E(M.S.A.) = E(M.S.E.) = σ2, under H0A

Otherwise,E(M.S.A.) > E(M.S.E.)

Under H0B, M.S.B. is an unbiased estimator of σ2. i.e.,

E(M.S.B.) = E(M.S.E.) = σ2, under H0B

Otherwise,E(M.S.B.) > E(M.S.E.)

The test statistic is given by the variance ratio

FA

=M.S.A.M.S.E.

∼ Fk−1,(k−1)(h−1) .

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

113

FB

=M.S.B.M.S.E.

∼ Fh−1,(k−1)(h−1) .

If FA> F

α, reject the null hypothesis H0A

.

If FB> F

α, reject the null hypothesis H0B

.

ANOVA Table

Sources of S.S. d.f. MS.S. F -ratioVariation

Criterion A S.S.A. k − 1 M.S.A. = S.S.A.k−1 F = M.S.A.

M.S.E.∼ F

k−1,(k−1)(h−1) .

Criterion B S.S.B. h− 1 M.S.B. = S.S.B.k−1 F = M.S.B.

M.S.E.∼ F

h−1,(k−1)(h−1) .

Error S.S.E. (k − 1)(h− 1) M.S.E. = S.S.E.N−k

Total T.S.S. N − 1

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

114

Calculation of Various Sum of Squares

Correction Factor, C.F. =G2

N

T.S.S. = Sum of squares of all observations− C.F.

=k∑

i=1

ni∑

j=1

y2ij− C.F.

S.S.A. =(R1)

2

h+

(R2)2

h+ . . .+

(Rk)2

h− C.F.

S.S.B. =(C1)

2

k+

(C2)2

k+ . . .+

(Ch)2

k− C.F.

S.S.E. = T.S.S.− S.S.A.− S.S.B.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

MODULE

THREE

Non-parametric Tests

To use parametric tests, there should be some assumptionsabout form of the underlying distribution or sample size shouldbe large. When such conditions are not satisfied we should optfor non-parametric tests. Recall that, non-parametric does notmean that there isn’t any parameter. It means that, knowingthe value of the parameter does not completely specifies thedistribution.

115

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

116

3.1 Advantages and Disadvantages

Advantages

1. Easily understandable.

2. Short calculations.

3. Assumption of distribution is not required.

4. Applicable to all types of data.

Disadvantages

1. Less efficient as compared to parametric tests.

2. The results may or may not provide an accurate answerbecause they are distribution free.

3.2 Applications of Non-Parametric

Test

The conditions when non-parametric tests are used are listedbelow:

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

117

1. When the population distribution is not known

2. When the sample size is not large to enough for normalapproximation

3. When the data is qualitative.

3.3 Test for Randomness

Wald-Wolfowitz Run Test

In order to arrive at a conclusion about a distribution on thebasis of a sample we often need to have a random sample, i.e.,sample is taken without any bias or pre-designed rule of selec-tion. Hence, often we test the randomness of a sample. Wald-Wolfowitz run test, developed by Abraham Wald and JacobWolfowitz, is a statistical analysis that helps determine the ran-domness of data. Runs test are applicable to either quantitativeor qualitative data. It is used to test whether a sequence of twopossible outcomes is random or to test a sample is random orfor determining whether the two populations follow the samedistribution.

Given an ordered sequence of two or more types of symbols,

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

118

a run is a succession of two or more identical symbols which arepreceded and followed by a different symbol or no symbol. Ifthe number of runs is too large or too small, it is unlikely thatthe points are random. The length of a run is the number oflike symbols in a run. For applying the run test it is importantto maintain the order in which the samples are chosen.

Test Procedure

In order to test if a sequence of dichotomous data is random thefollowing procedure is used. Let A and B be the two possibledichotomous outcomes. Let n1 be the number of observationsof type A, n2 be that of B and R be the number of runs. Thetest statistic R can take any value between 2 and n = n1 + n2 .A very large and a very small value of R supports H1 . If R liesbelow the lower critical value or above the upper critical value,we reject the null and conclude that the sequence is not random.

In case of numeric data the dichotomy is usually obtainedby comparing each number with a focal point like a median ormean. First arrange the observations in increasing order of theirmagnitude. The observations above the median are labeled A

and that below are labeled B. Then the above procedure is usedto conduct the test.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

119

For determining whether the two populations follow thesame distribution, the following procedure is used. A sampleof size n1 and n2 are taken from populations X and Y respec-tively. Combining the two populations, n1 + n2 = n samplesare arranged in increasing order of their magnitudes keepingtrack of the population. A clustering of samples from the samepopulation preceded and followed by that from the other formsa run. The total number of runs, R, in the combined sample ofX’s and Y ’s when arranged in increasing order can be used asa test statistic of H0 . When the two samples are drawn fromtwo populations having the same distribution, the sample mustbe very well mixed. That is, under H0 the X and Y symbolsare expected to be well mixed. If R lies between lower andupper critical values we accept H0 , otherwise reject H0 .

A test based on R is appropriate only for two-sided (general)alternatives. Tables of critical values are available.

Normal Approximation

For n1 or n2 ≥ 20, we can use normal approximation. The teststatistic is

Z =R− µ

R

σR

,

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

120

where µR

= 2n1n2n1+n2

+ 1 and σR

= 2n1n2 (2n1n2−n1−n2 )

(n1+n2 )2(n1+n2−1) . H0 isrejected if |Z| ≥ zα

2.

3.4 Problem of Location - Sign Test

When the population is not normal and sample size is small orthe data is not quantitative, to test the problem of location wecannot use parametric tests and we go for non-parametric tests.Here our aim is to check if the sample provide strong evidencethat the central location of the distribution (M , the median) isat the point M0 . Two important tests we study in this regardare:

1. One Sample Sign Test

2. One Sample Wilcoxon Signed Rank Test.

These are non parametric alternative for one sample t-test.

One Sample Sign Test

This test is one of the simplest of all non-parametric tests. Thesample is assumed to be taken from a population which is con-

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

121

tinuous, symmetrical and non-normally distributed. The nullhypothesis is

H0 : M = M0

against one of the possible alternatives

1. H1 : M > M0

2. H1 : M < M0

3. H1 : M 6= M0

Test Procedure

Let X1 , X2 , . . . , Xn be a r.s. of size n from a continuous popu-lation. A positive sign is given to an observed values X

iif it is

greater than the hypothesised median M0 and a negative signis given to an observed values X

iif it is less than the hypothe-

sised median M0 . If Xi

= M0 , ignore the zeros and reduce thenumber of observations accordingly. Let N+ be the number ofpositive signs and N− be the number of negative signs. Then,N = N+ +N−.

If the sample truly comes from the distribution with medianM0 , then it is expected that nearly half of the sample observa-

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

122

tions will be > M0 and nearly half of the observations will be< M0 .

Since the median divides the data in such a way that thenumber of observations above it is equal to the number of ob-servations below it, the probability of a positive sign is same asthe probability of the negative sign.

Once the observations are converted as above, under H0 ,they constitute a set of N independent random variables fromBernoulli population with probability of success, p = 1

2 , where,p is the probability of getting either a positive sign or negativesign. Then under H0 , N

+ ∼ B(N, 12 ) and N− ∼ B(N, 1

2 ).

Hence, the null hypothesis can also be written as

H0 : p =12

against one of the possible alternatives

1. H1 : p > 12

2. H1 : p < 12

3. H1 : p 6= 12

We reject H0 , in favor of

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

123

H1 : M > M0

(p > 1

2

):: either N− is too small or alterna-

tively N+ is too big

H1 : M < M0

(p < 1

2

):: if either N+ is too small or alter-

natively N− is too big

H1 : M 6= M0

(p 6= 1

2

):: if any one of N+ or N− is too big

or too small.

For small samples, the test statistic is S = min(N+, N−).Let k be the observed value of S. The p - value is P (S ≤ k). Ifp < α, we reject H0 . For two tailed test, H0 is rejected if p < α

2 .

When sample size is large,

Z =S − N

2√N4

→ N(0, 1).

Applying continuity corrections, the test statistic is

Z =S + 0.5− N

2√N4

→ N(0, 1).

The p - value is the cumulative probability corresponding to z,the calculated value of Z. That is, p = P (Z ≤ z). If p < α, wereject H0 . For two tailed test, H0 is rejected if p < α

2 .

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

124

Paired Sample Tests

Two Sample Sign Test

Two sample sign test can be used as the non-parametric versionof paired t test, like to study the effectiveness of any programmeor treatment implemented on the same group of subjects. It canalso be used where two samples are taken from two populationswhich have continuous symmetrical distributions and known tobe non-normal such that the probability of having, “the firstsample value less than the corresponding second sample value”as well as the probability of having ”the first sample value morethan the corresponding second sample value”, is 1

2 .

The null hypothesis is

H0 : M1 = M2

against one of the possible alternatives

1. H1 : M1 > M2

2. H1 : M1 < M2

3. H1 : M1 6= M2

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

125

Test Procedure

Give a positive sign if Xi− Y

i> 0 and negative sign if X

i−

Yi< 0, i = 1, 2, . . . n where, X

iand Y

irespectively denote

the corresponding observations in the first and second samples.Obviously, the sample sizes has to be equal. Now, P (Xi − Yi >

0) = P (Xi− Y

i< 0) = 1

2 . The two sample sign test is carriedout as in the case of one sample with this set of signs.

The null hypothesis can also be written as

H0 : p =12

against one of the possible alternatives

1. H1 : p > 12

2. H1 : p < 12

3. H1 : p 6= 12

We reject H0 , in favor of

H1 : M1 > M2

(p > 1

2

):: either N− is too small or alter-

natively N+ is too big

H1 : M1 < M2

(p < 1

2

):: if either N+ is too small or

alternatively N− is too big

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

126

H1 : M1 6= M2

(p 6= 1

2

):: if any one of N+ or N− is too

big or too small.

For small samples, the test statistic is S = min(N+, N−).Let k be the observed value of S. The p - value is P (S ≤ k). Ifp < α, we reject H0 . For two tailed test, H0 is rejected if p < α

2 .

When sample size is large,

Z =S − N

2√N4

→ N(0, 1).

Applying continuity corrections, the test statistic is

Z =S + 0.5− N

2√N4

→ N(0, 1).

The p - value is the cumulative probability corresponding to z,the calculated value of Z. That is, p = P (Z ≤ z). If p < α, wereject H0 . For two tailed test, H0 is rejected if p < α

2 .

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

127

3.5 Problem of Equality of two Popu-

lations

Median Test

Median test is used for comparing the distribution of two pop-ulations. The null hypothesis

H0 : M1 = M2

is tested against the two sided alternative

H1 : M1 6= M2 .

For each sample, the proportion of samples below C ischecked and then check their differences. If the difference issignificantly large, the null hypothesis is rejected. Otherwiseaccept the null. Even though the method is fast, it has thedisadvantage that the decision may vary with C. Typically, Ccan be any quantile. We consider C to be the median.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

128

Test Procedure

Let X1 , X2 , . . . , Xn1and Y1 , Y2 , . . . , Yn2

be two independentrandom samples. For each sample, check the proportion ofsamples below C. Let U be the number of X observations lessthan C and V be the number of Y observations less than C.Then,

U ∼ B(n1 , p1)

andV ∼ B(n2 , p2),

where p1 is P (X < C) and p2 is P (Y < C). Then the nullhypothesis can be stated as

H0 : p1 = p2

against the alternative

H1 : p1 6= p2 or p1 − p2 6= 0.

The appropriate test statistic is

U

n1

− V

n2

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

129

and the null is rejected if Un1− V

n2> Cα .

Alternatively, median of the combined sample is obtainedand the data is represented in a contingency table as below.

Sample I Sample II TotalAbove the Median a b a+ b

Below the Median c d c+ d

Total n1 = a+ c n2 = b+ d N

where N = a+ b+ c+ d.

Now, calculate

p =

(n1a

) (n2b

)(na+b

) .

If p < α reject the null hypothesis.

Large Sample Approximation

In case of large samples (n1 + n2 ≥ 20), we have the Moodsmedian test which is based on chi-square statistic. Here, no cellfrequency should be less than 5. First median of the combinedsample is obtained and the data is represented in a contingencytable as above.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

130

Under the null hypothesis, the test statistic is

χ2 =N(|ad− bc| − N

2 )2

(a+ b)(c+ d)(a+ c)(b+ d)∼ χ2(1).

Wilcoxon Rank Sum Test

Wilcoxon rank sum test is used to test whether the two popu-lation have the same distribution. That is,

H0 : FX

(x) = FY(x).

If it is known that the populations are of the same form, thenthe null will be medians are equal. That is,

H0 : M1 = M2

and the possible alternatives are

1. H1 : M1 > M2

2. H1 : M1 < M2

3. H1 : M1 6= M2

It is a non parametric analogue of two sample t test. It is as-sumed that the two populations are continuous.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

131

Test Procedure

Suppose that a sample of size n1 is taken from a continuouspapulation X and n2 from a continuous papulation Y , and thesamples are independent. Combine the two independent sam-ples and obtain the ranks of the combined data. Let R1 be thesum of the ranks of the first sample and R2 that of the second.The test statistic W , is the rank sum associated with the smallersample.

The critical regions are:

H1 C.R.M1 > M2 W > T

U

M1 < M2 W < TL

M1 6= M2 W < TL

or W > TU

Normal Approximation

For large values of n1 and n2 , say (≥ 10), the test statistic is

Z =W − n1 (N+1)

2n1n2 (N+1)

12

∼ N(0, 1),

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

132

where N = n1 + n2 . Reject H0 : M1 = M2 against the alterna-tive

1. H1 : M1 > M2 if Z > zα

2. H1 : M1 < M2 if Z < −zα

3. H1 : M1 6= M2 if |Z| ≥ zα/2

The critical values can be obtained from standard normal table.

Mann-Whitnney U Test

Mann-Whitnney U test is also used to test the equality of cen-trality of two continuous distributions. Although it is closelyrelated to Wilcoxon Rank sum test, it is slightly different. Thenull hypothesis is

H0 : FX

(x) = FY(x) ∀x

against

H1 : FX

(x) = FY(x− θ) ∀ x and θ 6= 0.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

133

If the populations are assumed to be of the same form, then

H0 : M1 = M2

and the possible alternatives are

1. H1 : M1 > M2

2. H1 : M1 < M2

3. H1 : M1 6= M2

It is also a non parametric analogue of two sample t test. It isassumed that the two populations are continuous.

Test Procedure

Suppose that a sample of size n1 is taken from a continuouspapulation X and n2 from continuous papulation Y . Combinethe two independent samples and arrange them in increasingorder of magnitude. The statistic U1 is the sum of the numberof y observations that are less than each of the x observations inthe combined ordered arrangement. Similarly, the statistic U2

is the sum of the number of x observations that are less thaneach of the y observations in the combined ordered arrangement.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

134

The possibility of xi = yj for some i, j can be omitted. Let

T (xi, y

j) =

{1 if yj < xi

o if yj > xi

where i = 1, 2, . . . , n1 and j = 1, 2, . . . , n2 . Let

U1 =n1∑i=1

n2∑j=1

T (xi, y

j)

and

U2 =n1∑i=1

n2∑j=1

(1− T (xi , yj )).

U1 = 0 (or U2 = n1n2) if all xi’s are < y

j’s. Hence, mostly

FX> F

Y(M1 < M2).

U1 = n1n2 (or U2 = 0) if all xi ’s are > yj ’s. Hence, mostlyF

X< F

Y(M1 > M2).

The test statistic U = min(U1 , U2). If H0 is true U shouldbe close to mn

2 . If U = U1 is too small, reject H0 in favour ofH1 : F

X> F

Yand if U = U2 is too small, reject H0 in favour of

H1 : FX< F

Y.

Therefore, the rejection region is U ≤ cα

for one tailed test

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

135

and U ≤ cα2

for two tailed test.

Normal Approximation

For large values of n1 and n2 , say (≥ 10), the test statistic is

Z =U − n1n2

2√n1n2 (n1+n2+1)

12

∼ N(0, 1).

Reject H0 : M1 = M2 against the alternative

1. H1 : M1 > M2 if Z < −zα

2. H1 : M1 < M2 if Z > zα

3. H1 : M1 6= M2 if |Z| ≥ zα/2

The critical values can be obtained from standard normal table.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

136

3.6 Problem of Equality of Several

Population Medians

Kruskal-Wallis Test

Kruskal-Wallis test is a non-parametric analogue of one-wayANOVA and is a generalisation of the Wilcoxon rank sum testto more than two populations. It is also called one-way ANOVAon ranks. It tests equality of two or more population medians.The test statistic used is called the H statistic. The hypothesisfor the test are

H0 : The population medians are equal.

in other words

H0 : M1 = M2 = . . . = Mk

against

H1 : The population medians are not equal.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

137

Test Procedure

Combine all the samples and rank them. Let Ridenote the sum

of the ranks in ith group. The test statistic is

H =12

n(n+ 1)

k∑i=1

R2i

ni

− 3(n+ 1),

where, n = n1 + n2 + . . . + nk

and ni

is the sample size of thetth sample. The test statistic follows chi-square distribution ifthe number of samples in each group is more than 5. Reject thenull hypothesis if H ≥ χ2

k−1otherwise accept the null.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

138

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

MODULE

FOUR

Quality Control

Quality control is a procedure or a set of procedures performedto ensure the quality criterion of a product or service. Statis-tical quality control (S.Q.C.) is the use of statistical methodsin the monitoring and maintaining the quality of products andservices, which determines its fitness to use. S.Q.C. is one ofthe most important application of statistics in industry, basedon the theory of probability and sampling.

139

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

140

Here, quality does not mean the highest standard, but thequality which conforms to the standards specified for measure-ment. In many cases, it will be lower than the highest possiblestandard. In fact, consistency in quality standard is expectedrather than the absolute standard. Quality control, therefore,covers all the factors and processes of production which may bebroadly classified as follows:

1. Quality of materials: Material of good quality will re-sult in smooth processing thereby reducing the waste andincreasing the output. It will also give better finish to theend products.

2. Quality of manpower: Trained and qualified personnelwill give increased efficiency due to the better quality pro-duction through the application of skill and also reduceproduction cost and waste.

3. Quality of machines: Better quality equipment will re-sult in efficient work due to lack or scarcity of breakdownsand thus reduce the cost of defectives.

4. Quality of management: A good management is im-perative for increase in efficiency, harmony in relations,and growth of business and markets.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

141

4.1 Basis of S.Q.C.

The basis of statistical quality control is the degree of ‘vari-ability’ in the size or the magnitude of a given characteristic ofthe product. Variation in the quality of manufactured prod-uct in the repetitive process in industry is inherent and in-evitable. These variations are broadly classified as being dueto two causes, viz., i) chance causes, and ii) assignable causes.

1. Chance Causes: Some “stable pattern of variation” or“a constant cause system” is inherent in any particularscheme of production and inspection. The variation due tothese causes is beyond the control of human hand and can-not be prevented or eliminated under any circumstances.One has got to allow for variation within this stable pat-tern, usually termed as allowable variation. The range ofsuch variation is known as ’natural tolerance of the pro-cess’.

2. Assignable Causes: The second type of variation at-tributed to any production process is due to non-randomor the so-called assignable causes and is termed as pre-ventable variation. The assignable causes may creep inat any stage of the process, right from the arrival of theraw materials to the final delivery of goods. Some of the

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

142

important factors of assignable causes of variation are sub-standard or defective raw materials, new techniques or op-erations, negligence of the operators, wrong or improperhandling of machines, faulty equipment, unskilled or in-experienced technical staff, and so on. These causes canbe identified and eliminated and are to be discovered ina production process before it goes wrong, i.e., before theproduction becomes defective.

The main purpose of Statistical Quality Control (S.Q.C.) isto devise statistical techniques which would help us in separatingthe assignable causes from the chance causes, thus enabling usto take immediate remedial action whenever assignable causesare present. Hence, a production process is said to be in a stateof statistical control, if it is governed by chance causes alone, inthe absence of assignable causes of variation.

Benefits of Statistical Quality Control

1. It provides a means of detecting error at inspection.

2. It leads to more uniform quality of production.

3. It improves the relationship with the customer.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

143

4. It reduces inspection costs.

5. It reduces the number of rejects and saves the cost of ma-terial.

6. It provides a basis for attainable specifications.

7. It points out the bottlenecks and trouble spots.

8. It provides a means of determining the capability of themanufacturing process.

9. It promotes the understanding and appreciation of qualitycontrol.

Process Control And Product Control

Process Control: The main objective in any production pro-cess is to control and maintain a satisfactory quality level of themanufactured product so that it conforms to specified qualitystandards. In other words, we want to ensure that the pro-portion of defective items in the manufactured product is nottoo large. This is termed as ‘process control’ and is achievedthrough the technique of “Control Charts” pioneered by W.A.Shewhart in 1924.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

144

Product Control: By product control we mean controllingthe quality of the product by critical examination at strategicpoints and this is achieved through ‘Sampling Inspection Plans’pioneered by H.F. Dodge and H.C. Romig. Product control aimsat guaranteeing a certain quality level to the consumer regard-less of what quality level is being maintained by the producer.In other words, it attempts to ensure that the product marketedby a department does not contain a large number of defective(unsatisfactory) items. Thus, product control is concerned withclassification of raw materials, semi-finished goods or finishedgoods into acceptable or rejectable items.

Control Limits, Specification Limits,

Tolerance Limits

1. Control Limits: These are limits of sampling variationof a statistical measure (e.g. mean, range, or fraction-defective) such that if the production process is under con-trol, the values of the measure calculated from different ra-tional sub-groups will lie within these limits. Points fallingoutside control limits indicate that the process is not oper-ating under system of chance causes, i.e., assignable causesof variation are present, which must be eliminated. Con-

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

145

trol limits are used in ‘Control Charts’. Control limits,also known as natural process limits, are horizontal linesdrawn on a statistical process control chart, usually at adistance of ±3 standard deviations of the plotted statisticfrom the statistic’s mean.

2. Specification Limits: When an article is proposed to bemanufactured, the manufacturers have to decide upon themaximum and the minimum allowable dimensions of somequality characteristics so that the product can be gainfullyutilised for which it is intended. If the dimensions arebeyond these limits, the product is treated as defective andcannot be used. These maximum and minimum limits ofvariation of individual items, as mentioned in the productdesign, are known as ‘specification limits’.

3. Tolerance Limits: Variation due to chance causes isinherent in the outputs under any scheme of production.These are limits of variation of a quality measure of theproduct between which at least a specified proportion ofthe product is expected to lie (with a given probability),provided the process is in a state of statistical quality con-trol. Almost all the variations due to chance causes liewithin µ ± 3σ limits and those limits are called naturaltolerance limits. The width 6σ is called the natural toler-

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

146

ance.

Control limits describe what a process is capable of produc-ing (sometimes referred to as the “voice of the process”), whiletolerances and specifications describe how the product shouldperform to meet the customer’s expectations (referred to as the“voice of the customer”).

Acceptance Sampling

A buyer draws a sample of a few units from a lot that is to beaccepted by him if the number of defectives is less otherwise thelot is to be rejected. This technique of sampling inspection anddecision making is called acceptance sampling.

Variables and Attributes

The characteristics of a product which are measurable and canbe expressed in their respective units of measurement are calledvariables. For example, length, temperature, time etc.

The characteristics of a product which are not measurable

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

147

but can be identified by their presence or absence are calledattributes. This applies to things that can be judged by visualexamination. For example, spots in enamel painting, crack ona glass tumbler etc.

Control Charts

Control charts are used to identify whether a manufacturing pro-cess is under statistical control, that is, it governed by chancescauses alone. If there is an influence of assignable cause, neces-sary actions should be taken to bring the process under control.This technique was introduced by Dr. Walter A. Shewart. It isbased on the theory of probability and sampling.

Control charts consists of 3 horizontal lines besides the usualx and y axes, which are the central line and two control limitson either side of central line.

1. Central Line: Central line (C.L.) denotes the averagevalue of the characteristics, which is drawn at the meanof the observations.

2. Upper Control Limit: Upper control limit (U.C.L.) isat 3σ distance above the central line.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

148

3. Lower Control Limit: Lower control limit (L.C.L.) isat 3σ distance below the central line. If the 3σ distancebelow the central line is below the x - axis, then the Lowercontrol limit is the x - axis.

A chart is drawn for one statistical measure of observations.If this measure follows normal law, 99.73% of the observationsare expected to lie with in the control limits. Otherwise, 8/9 ofthe observations are expected to lie with in the control limits.Hence, control charts protect against both types of errors - notnoticing the trouble when there is and looking for trouble whenthere is not.

At a time, a few units, say n, are chosen. Those units formone subgroup. On the basis of all the subgroups, the chart isdrawn with a central line and the control limits. Subgroup orsample numbers are represented in x - axis and the measures of

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

149

subgroups of observations are represented in y - axis. For eachsubgroup or sample one point is plotted. The chart containsthe points of all the subgroups. If any point lies in the regionoutside control limits, called out of control region, it indicatesthat there is some assignable cause of variation and the processis not under statistical control.

Standards Known: Sometimes the nature of the processmay be known from the past. On that basis the control limitscan be found out and the present sample need be considered.When the past standards are not known the control limits arefound on the basis of the sample under consideration. We willbe considering this kind of charts.

Revised Control Limits: From a sample under consider-ation those items which fall in the ‘out of control’ region aredeleted and then the control limits are found again. Those con-trol limits are the revised control limits.

Rational Subgroup: A rational subgroup is a group ofunits produced under the same set of conditions. Rational sub-groups are meant to represent a “snapshot of the process. Theyalso reflect how your data are collected, and represent the in-herent (common cause) variation in your process at any giventime.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

150

For many processes, you can form rational subgroups bysampling multiple observations that are close together in time,but still independent of each other. For example, a die cut ma-chine produces 100 plastic parts per hour. The quality engineermeasures five randomly selected parts at the beginning of everyhour. Each sample of five parts is a subgroup.

Types of Control Charts

There are two types of control charts:

1. Control charts for variables

2. Control charts for attributes.

Control chart for variables: As we have defined earlier,variables are the quality characteristics of manufactured prod-ucts which are measurable in their respective units of measure-ments. These types of variables are continuous in nature andthey follow the Normal distribution. For this purpose we usetwo Charts:

1. the chart for mean (X) and range (R)

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

151

2. the chart for mean (X) and standard deviation (σ)

Control chart for Attributes To control the quality ofproducts which are governed by the attributes we use, the p -chart for proportion of defectives, the np - chart for number ofdefectives and the c - chart for number of defects per item orthe unit.

3σ Control limits

3σ limits were proposed by Dr. Shewhart for his control chartsfrom various considerations, the main being probabilistic con-siderations. Consider the statistic T = {X1 , X2 , . . . , Xn}. LetE(T ) = A and V (T ) = σ2. If the statistic T is normally dis-tributed, then from the fundamental area property of the normaldistribution, we have

P [µ− 3σ < T < µ+ 3σ] = 0.9973

orP [|T − µ| > 3σ] = 0.0027.

Here µ − 3σ is called L.C.L. and µ + 3σ is called U.C.L. If forthe ith sample, the observed T lies between L.C.L. and U.C.L.,there is nothing to worry, otherwise a danger signal is indicated.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

152

4.2 Control Charts for Variables

These charts may be applied to any quality characteristic thatis measurable. In order to control a measurable characteristicwe have to exercise control on the measure of location as wellas the measure of dispersion. Usually X and R charts are em-ployed to control the mean and dispersion respectively of thecharacteristic.

X - Chart

No production process is perfect enough to produce all the itemsexactly alike. Some amount of variation, in the produced items,is inherent in any production scheme. This variation is the to-tality of numerous characteristics of the production process viz.,raw material, machine setting and handling, operators, etc. Aspointed out earlier, this variation is the result of (i) chancecauses, and (ii) assignable causes. The control limits in theX chart are so placed that they reveal the presence absence ofassignable causes of variation in the average - mostly related tomachine setting.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

153

Procedure for the Construction X - Chart

1. Compute the mean of each sample of the same size n, sayx1 , x2 , . . . , xk

, where k denote the number of samples.

2. Compute the C.L., C.L.X

= ¯x = x1+x2+...+xk

k

3. Compute the range or standard deviation (as required) ofeach sample of the same size n, say R1 , R2 , . . . , Rk

ands1 , s2 , . . . , sk

respectively.

4. Compute R = R1+R2+...+Rk

k or s = s1+s2+...+sk

k as re-quired.

5. Obtain the U.C.L. and L.C.L. using the appropriate for-mula.

(a) When µ = µ′ and σ = σ′ are known, and A = 3/√n,

U.C.L.x

= µ′ +Aσ′

L.C.L.x = µ′ −Aσ′

(b) When standards are not given

i. If both µ and σ are unknown, using their esti-mates ¯x and σ = R

d2and A2 = 3/(d2

√n), then

U.C.L.x = ¯x+A2R

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

154

L.C.L.x = ¯x−A2R

ii. If the limits are to be obtained in terms of s sam-ple rather than R, σ = s

C2and A1 = 3/(C2

√n),

thenU.C.L.x = ¯x+A1 s

L.C.L.x = ¯x−A1 s.

R - Chart

R - chart shows variability within the process. The control limitsin the R - chart are so placed that they reveal the presenceabsence of assignable causes of variation in the range - mostlyrelated to negligence on the part of the operator.

Procedure for the Construction R - Chart

1. Compute the range of each sample of the same size n, sayR1 , R2 , . . . , Rk

, where k denote the number of samples.

2. Compute the C.L., C.L.R

= R = R1+R2+...+Rk

k

3. The 3 - σ control limits for R - chart are E(R) ± 3σR,

where E(R) is estimated by R

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

155

(a) When σ is known,

U.C.L.R

= D2σ

L.C.L.R

= D1σ

(b) When σ is unknown, σR

is estimated from the rela-tion σ

R= d3 σ = d3

Rd2,

U.C.L.R

= D4R

L.C.L.R

= D3R.

s or σ - Chart

Since standard deviation is an ideal measure of dispersion, acombination of control chart for mean (X) and standard devi-ation (s), known as X and s - charts (or X and σ - charts) istheoretically more appropriate than a combination of X and R- charts for controlling process average and process variability.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

156

Procedure for the Construction σ - Chart

1. Compute the standard deviation of each sample of thesame size n, say s1 , s2 , . . . , sk

, where k denote the numberof samples.

2. Compute the C.L., C.L.s = s = s1+s2+...+sk

k

3. The 3 - σ control limits for s - chart are E(s) ± 3σs,

where E(s) is estimated by s

(a) When σ is known,

U.C.L.R

= B2σ

L.C.L.R

= B1σ

(b) When σ is unknown, σs is estimated from the relationσs = C3 σ = C3

sC2,

U.C.L.R

= B4 s

L.C.L.R

= B3 s.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

157

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

158

4.3 Control Charts for Attributes

In spite of wide applications of X and R -(or σ) charts as apowerful tool of diagnosis of sources of trouble in a productionprocess, their use is restricted because of the following imita-tions.

1. They are charts for variables only, i.e., for quality charac-teristics which can be measured and expressed in numbers.

2. In certain situations they are impracticable and un-economical.

As an alternative to X and R -charts, we have the controlchart for attributes which can be used for quality characteristics:

1. which can be observed only as attributes by classifyingan item as defective or non defective i.e., conforming tospecifications or not

2. which are actually observed as attributes even though theycould be measured as variables, eg., go and no-go gaugetest results.

There are two control charts for attributes

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

159

1. Control chart for fraction defective (p - chart) or the num-ber of defectives (np - chart or d - chart).

2. Control chart for the number of defects per unit (c - chart).

p - chart

p - chart is the most widely used control chart for attributes.This chart is for the fraction defectives (fraction rejected as notattaining the standards specified). The objective of p - chartis to ascertain and to evaluate the quality of the items and toobserve the changes in quality over a period of time. This is animmediate guide for correcting the causes of bad quality.

While dealing with attributes a process will be adjudged instatistical control if all the samples or sub-groups are ascertainedto have the same population proportion p.

If ‘d’ is the number of defectives in a sample of size n, thend is a binomial variate with parameters n and p. Therefore,

E(d) = np and V (d) = npq, q = 1− p.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

160

Let the sample proportion of defective is p = dn . Then,

E(p) =1nE(d) =

1nnp = p

andV (p) =

1n2

V (d) =1n2

npq =pq

n, q = 1− p.

Procedure for the Construction p - Chart

1. Compute the fraction defectives of each sample of size n,say p1 , p2 , ldots, pk

, where k denotes the number of sam-ples.

2. Compute the C.L., C.L.p

= p = p1+p2+...+pk

k

3. The 3 - σ control limits for p - chart are E(p) ± 3σp ,where E(p) is estimated by p. Therefore,

U.C.L.p

= p+ 3

√p(1− p)

n

L.C.L.p = p− 3

√p(1− p)

n

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

161

np - chart or d - chart

If instead of p, the sample proportion defective, we use d, thenumber of defectives in the sample, then we have the d - chart.The number of defectives d = np will always be an integer. Ifthe number of items inspected is the same on each occasion,then plotting the number of defectives (d) is more convenientthan plotting the fraction defectives (p). in navethep chart, ifn = 100 then we have the percentage defective chart or the 100p - chart.

Procedure for the Construction d - Chart

1. Compute the number of defectives of each sample of size n,say d1 , d2 , ldots, dk

, where k denotes the number of sam-ples.

2. Compute the C.L., C.L.d

= d = np = d1+d2+...+dk

k

3. The 3 - σ control limits for p - chart are E(d) ± 3σd,

where E(d) is estimated by d = np. Therefore,

U.C.L.d

= np+ 3√np(1− p)

L.C.L.d

= np− 3√np(1− p)

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

162

Remark 4.3.1. p and d - Charts for Fixed Sample Size

If the sample sizes remains constant for each sample (as weconsidered) p = d

n .

c - Chart

In many manufacturing or inspection situations, the sample sizen i.e., the area of opportunity is very large (since the opportu-nities for defects to occur are numerous) and the probability pof the occurrence of a defect in any one spot is very small suchthat np is finite. In such situations from statistical theory weknow that the pattern of variations in data can be representedby Poisson distribution, and consequently 3 − σ control limitsbased on Poisson distribution are used. Since for a Poisson dis-tribution, mean and variance are equal, if we assume that c, thenumber of defects, is Poisson variate with parameter, λ, we get

Procedure for the Construction c - Chart

1. Compute the number of defects of each unit, sayc1 , c2 , . . . , ck

, where k denotes the number of units(samples).

2. Compute the C.L., C.L.c

= c = c1+c2+...+ck

k

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

163

3. The 3 - σ control limits for c - chart are E(c) ± 3σc ,where E(c) is estimated by c and σ

cby√c. Therefore,

U.C.L.c

= c+ 3√c

L.C.L.c = c− 3√c

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

164

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

BIBLIOGRAPHY

[1] Rohatgi V. K. and Saleh, A.K. Md. E. (2009): An Intro-duction to Probability and Statistics. 2nd Edn. (Reprint),John Wiley & Sons.

[2] Gupta, S.P. Statistical Methods, Sultan Chand and Sons:New Delhi.

[3] S.C.Gupta and V. K. Kapoor, Fundamentals of Mathemat-ical Statistics, Sultan Chand & Sons.

[4] Mood, A.M. Graybill, F.A. and Boes, D.C. (2007): Intro-duction to the Theory of Statistics, 3rd Edn., (Reprint),Tata McGraw-Hill Pub. Co. Ltd.

165

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut

166

[5] John E. Freund, Mathematical Statistics, Pearson Edn,New Delhi.

[6] Grant E.L., Statistical quality control, McGraw Hill.

[7] Montogomery, D.C. (2009): Introduction to StatisticalQuality Control, 6th Edition, Wiley India Pvt. Ltd.

[8] K.X. Joseph: Subsidiary Statistics.

STA4C04 : Statistical Inference and Quality Control

School of Distance Education, University of Calicut