0% found this document useful (0 votes)
17 views41 pages

QA Hypothesis

This document covers the fundamentals of hypothesis testing in statistics, including the definitions of null and alternative hypotheses, types of errors, and the Neyman-Pearson Lemma for determining the most powerful tests. It explains the steps involved in hypothesis testing, the significance levels, and the concepts of Type I and Type II errors. Additionally, it discusses one-tailed and two-tailed tests, as well as the importance of selecting the appropriate test statistic and critical region.

Uploaded by

anshujena007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views41 pages

QA Hypothesis

This document covers the fundamentals of hypothesis testing in statistics, including the definitions of null and alternative hypotheses, types of errors, and the Neyman-Pearson Lemma for determining the most powerful tests. It explains the steps involved in hypothesis testing, the significance levels, and the concepts of Type I and Type II errors. Additionally, it discusses one-tailed and two-tailed tests, as well as the importance of selecting the appropriate test statistic and critical region.

Uploaded by

anshujena007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Module 6

Test of hypothesis

Dr. Teena Trivedi


Assistant Professor
Universal college of Engineering
Content

1. Null and alternative hypothesis


2. Types of error
3. Neyman Pearson Lemma-MP and UMP tests
Inferential Statistics

Inferential statistics to make judgements the


probability that an observed difference between
groups in dependable one or one that might have
happened by chance.
There are two main methods used in
inferential statistics
● Estimation
● Hypothesis testing
What is a hypothesis
● A hypothesis is an assumption about the population parameter.
● A parameter is the characteristic of the population, like its mean or
variance.
● The parameter must be identified before analysis.
Testing of Hypothesis

● A hypothesis is an assumption about the population parameter (say


population mean) which is to be tested.
● For that we collect sample data , then we calculate sample statistics
(say sample mean) and then use this information to judge/decide whether
hypothesized value of population parameter is correct or not.
● To test the validity of assumed or hypothetical value of population , we
gather sample data and determine the difference between hypothesized
value and actual value of the sample mean.
● Then we judge whether the difference is significant or not.
● The smaller the difference, the greater the likelihood that our hypothesized
value for the mean is correct. The larger the difference, the smaller the
likelihood.
Null hypothesis

● In hypothesis testing the first step is to state the


assumed or hypothesized(numerical) value of the
population parameter.
● The assumption we wish/ want to test is called the null
hypothesis.The symbol for null hypothesis is H0
The Null Hypothesis

State the assumptions( numerical ) to be tested .

Example : The average weight of the semester V student is 58 kg

Begin with the assumption that the null hypothesis is True.

(Similar to the notion of innocent until proven guilty)


The alternative hypothesis

It is the opposite of the null hypothesis.

The average weight of the students is not equal to 58 kg.


Procedure : Hypothesis Testing

The Hypothesis Testing comprises the following steps:

Step 1: Set up a hypothesis.

Step 2: Set up the suitable significance level.

The confidence with which an experimenter rejects or accepts Null Hypothesis depends on
the significance level adopted. Level of significance is the rejection region ( which is outside
the confidence or acceptance region).The level of significance, usually denoted by the alfa 𝛂
Selecting the level of significance

Though any level of significance can be adopted, in practice we either


take 5% or 1% level of significance.
When we take 5% level of significance(𝛂 = .05), then there are about
5% chances out of 100 % that we would reject the null hypothesis. In
other words out of 100, 95% chances are there that the null
hypothesis will be accepted i.e. we are about 95% confident that we
have made the right decision.
Critical value (Rejection region)

Critical value
If our sample statistic(calculated value) fall in the acceptance region, then
it simply means that there is no evidence to reject the null hypothesis. It
proves that null hypothesis is true. Otherwise, it will be rejected.
Step 3: Determination of suitable test statistic: For example Z, t
Chi-Square or F-statistic.
Step 4: Determine the critical value front the table.
Test the statistics:

Step 5: After doing computation, check the sample result.. Compare the
calculated value( sample result) with the value obtained from the
table.(tabulated or critical value)

Step 6: Marking Decisions :Making decisions means either accepting or


rejecting the null hypothesis. If computed value(absolute value) is more
than the tabulated or critical value, then it falls in the critical region. In
that case, reject null hypothesis, otherwise accept.
Steps in testing the statistics
Critical region
2. Type I and Type II Errors

When a statistical hypothesis is tested, there are 4 possible results:


● The hypothesis is true but our test accepts it.
● The hypothesis is false but our test rejects it.
● The hypothesis is true but our test rejects it.
● The hypothesis is false but our test accepts it.
Obviously, the last 2 possibilities lead to errors.
Rejecting a null hypothesis when it is true is called a Type I error.
Accepting a null hypothesis when it is false is called Type II error.
P{Reject Ho when it is true} =P (Reject H0IH0) =α} and
P {Accept Ho when it is wrong} = P{Accept H0|H1}=β
Then α and β are called the sizes of type I error and type II error,
respectively.
ERROR IN TESTING THE HYPOTHESIS
One-Tailed and Two-Tailed Tests
Two-Tailed Test is that where the
hypothesis about the population
parameter is rejected for the value of
sample statistic failing into either tail
of the distribution.fig 3
When the hypothesis about the
population parameter is rejected for
the value of sample statistic failing
into one side tail of the distribution,
then it is known as one-tailed test. If
the rejection area falls on the right
side, then it is called right-tailed
test.fig 2
On the other hand If the rejection area
falls on the right side, then it is called
left-tailed test.fig 1
Summary on one tailed and two tailed test
Example : One-Tailed and Two-Tailed Tests
let us suppose that two different concerns manufacture drugs for inducing sleep, drug A manufactured
by first concern and drug B manufactured by second concern. Each company claims that its drug is
superior to that of the other and it is desired to test which is a superior drug A or B ? To formulate the
statistical hypothesis let X be a random variable which denotes the additional hours of sleep gained by
an individual when drug A is given and let the random variable Y denote the additional hours of sleep
gained when drug B is used. Let us suppose that X and Y follow the probability distributions with means
μx and μy respectively. Here our null hypothesis would be that there is
Ho .difference between the effects of two drugs. Symbolically,
Ho : μx = μy
Alternative Hypothesis. It is desirable to state what is called an alternative hypothesis in respect of
every statistical hypothesis being tested because the acceptance or rejection of a null hypothesis is
meaningful only when it is being tested against a rival hypothesis which should rather be explicitly
mentioned. Alternative hypothesis is usually denoted by H1. For example, in the example of light bulbs,
alternative hypothesis could be H1: μ > μ0 or μ<μ0 or μ≠ μ0 In the example of drugs, the alternative
hypothesis could be H1: μx> μy or μx < μy or μx≠ μy
In both the cases, the first two of the alternative hypotheses give rise to what are called 'one tailed' tests
and the third alternative hypothesis results in 'two tailed' tests.
The means of two random samples of sizes 9 and 7 are 196.42 and 198.82 respectively. The sum of the squares of
the derivatives from the means are 26.94 and 18.73 respectively. Can the samples be regarded to have been drawn
from the same normal population?

SOLUTION:-Null hypothesis Ho : μ1 = μ2

alternative hypothesis Ha : μ1≠ μ2


Need Break?????
Likelihood Function
Definition: Let be a random Sample x1, x2, x3…..xn of size
n from a population with density function f(x,θ). Then the
likelihood function of the sample values usually denoted
by L(θ) is their joint density function; given-by
"
Simple hypothesis and Composite hypothesis.

If a random sample is taken from a distribution with parameter θ, a


hypothesis is said to be a simple hypothesis if the hypothesis uniquely
specifies the distribution of the population from which the sample is
taken. Any hypothesis that is not a simple hypothesis is called a
composite hypothesis.
TYPE I AND TYPE II ERROR

Power of the Test. 1 -β is called the power function of the test hypothesis H0
against the alternative hypothesis H1 The value of the power function at a
parameter point is called the power of the test at that point.
Optimum Test Under Different Situations. As per discussion it is difficult to obtain
the so called best test under different situations. In any testing problem the first two
steps

1. the form of the population distribution the parameter(s) of interest and the framing
of H0 and H1 should be obvious from the description of the problem.

2. The most crucial step is the choice of the 'best test, i.e; the best statistic 't' and the
critical region W where by best test we mean one which in addition to controlling 𝛂
at any desired low level has the minimum type II error β or maximum power 1 - β.
compared to β of all other tests having this:𝛂 This leads to the following definition.
Most powerful test
Let us consider the problem of testing a simple hypothesis

Ho : 𝜃 = 𝜃0 against a simple alternative hypotheses H1 : 𝜃 = 𝜃1

Definition. The critical region W is the most powerful (MP) critical


region of size 𝛂 (and the corresponding test a most powerful test of
level 𝛂) for testing Ho : 𝜃 = 𝜃0against H1 : 𝜃 = 𝜃1 if

for every other critical region W1 satisfying the condition 1


Uniformly most powerful tests (UMP)
Let us now take up the case of testing a simple null hypothesis against a composite
alternative hypothesis. e.g: of testing H :𝜃 = 𝜃0 against the alternative H1 :𝜃 = 𝜃1
o
In such a case. for a predetermined 𝛂. the best test for H is called the uniformly most
o
powerful test of level 𝛂..

Definition The region W is called uniformly most powerful (UMP) critical region of size
𝛂.[and the corresponding test as uniformly most powerfuL (UMP) test of level 𝛂 ]for
testing H : 𝜃 = 𝜃0against H1 : 𝜃 = 𝜃1 i.e H1 : 𝜃 = 𝜃1≠ 𝜃0
o

if

for every other critical region W1


Uniformly most powerful tests (UMP)

● Typically, it is important to handle the case where the alternative


hypothesis may be a composite one
● It is desirable to have the best critical region for testing H0 against
each simple hypothesis in H1
● The critical region C is uniformly most powerful (UMP) of size α
against H1 if it is so against each simple hypothesis in H1
● A test defined by such a regions is a uniformly most
powerful(UMP) test.
● Such a test does not always exist
Neyman-Pearson Lemma
As we learned from our work in the previous lesson, whenever we perform a hypothesis test,
we should make sure that the test we are conducting has sufficient power to detect a
meaningful difference from the null hypothesis. That said, how can we be sure that the T-test
for a mean μ is the "most powerful" test we could use? Is there instead a K-test or a V-test or
you-name-the-letter-of-the-alphabet-test that would provide us with more power? A very
important result, known as the Neyman Pearson Lemma, will reassure us that each of the
tests we learned is the most powerful test for testing statistical hypotheses about the
parameter under the assumed probability distribution. Before we can present the lemma,
however, we need to:

1. Define some notation


2. Learn the distinction between simple and composite hypotheses
3. Define what it means to have a best critical region of size α
Notation
Neyman-Pearson Lemma
This Lemma provides the most powerful test of simple hypothesis against a
simple alternative hypothesis. The theorem, known as Neyman-Pearson Lemma,
will be proved for density function f(x,θ) of a single continuous variate and a
single parameter. However, by regarding x and θ as vectors, the proof can be
easily generalised for any number of random variables x1, x2, x3…..xn and any
number of parameters θ1, θ2, θ3…..θn The variables x1, x2, x3…..xn occurring in
this theorem are understood to represent a random sample of size n
from the population whose density function is f(x,θ). The lemma is
concerned with a simple hypothesis Ho :𝜃 = 𝜃0 and a simple alternative H1 :𝜃
= 𝜃1
Theorem 16·1. (Neyman-Pearson Lemma). Let k > 0. be a constant
and W be a critical region of size α such that

where L0 and L1 are the likelihood functions of the sample


observations x1, x2, x3…..xn under H0 and H1 respectively. Then W is
the most powerful critical region of the test hypothesis Ho :𝜃 = 𝜃0
against the alternative H1 :𝜃 = 𝜃1
PROOF :We are given

The power of region is

In order to establish the lemma, we have to prove that there exists no other
critical region, of size less than or equal to α, which is more powerful than W.
Let W1 be another critical region of size α1 ≤ α, and power I - β1 so that we
have
THANK YOU

You might also like