0% found this document useful (0 votes)
2 views15 pages

Understanding Hypothesis Testing Basics

The document provides an overview of hypothesis testing in statistics, explaining the concepts of null and alternative hypotheses, Type I and Type II errors, and the significance level. It discusses critical values, rejection zones, and methods for calculating p-values, along with examples of one-tailed and two-tailed tests. The document emphasizes the importance of understanding the implications of errors in hypothesis testing and provides exercises for practical application.
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)
2 views15 pages

Understanding Hypothesis Testing Basics

The document provides an overview of hypothesis testing in statistics, explaining the concepts of null and alternative hypotheses, Type I and Type II errors, and the significance level. It discusses critical values, rejection zones, and methods for calculating p-values, along with examples of one-tailed and two-tailed tests. The document emphasizes the importance of understanding the implications of errors in hypothesis testing and provides exercises for practical application.
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

UNIVERSITY OF THE ANDES

SCHOOL OF ENGINEERING

SCHOOL OF SYSTEMS

DEPARTMENT OF OPERATIONS RESEARCH

ESTOCASTICA II

Hypothesis Testing

Prof.: Daniela de la Rosa

José Romero 23782765

Keiswuer Chirinos 24139094

Nathaly Briceño 20766037

Mérida, 2015

1
Hypothesis Testing

A hypothesis test is a statistical test that is used to


determine if there is sufficient evidence in a sample of data to infer that
certain condition is valid for the entire population. A hypothesis test examines
two opposing hypotheses about a population: the null hypothesis and the hypothesis
alternative. The null hypothesis is the statement that will be tested. Generally, the
The null hypothesis is a statement that "there is no effect" or "there is no difference."
The alternative hypothesis is the statement that one wishes to be able to conclude is true.

Based on the sample data, the test determines whether to reject


the null hypothesis. To make the decision, a p-value is used. If the p-value is less
or equal to the significance level, which is a cutoff point that you define,
then you can reject the null hypothesis. A common misconception is that
hypothesis testing statistical tests are designed to select the most
probable from two hypotheses. In fact, a test will maintain the validity of the
null hypothesis until there is sufficient evidence (data) in favor of the hypothesis
alternative.

Introduction to Hypothesis Testing

Type I Error

If you reject the null hypothesis when it is true, you make a mistake.
type I. The probability of committing a type I error is α, which is the level of
significance that you establish for your hypothesis test. An α of 0.05 indicates
that you are willing to accept a 5% chance that you are wrong
when rejecting the null hypothesis. To reduce this risk, you must use a value
lower for α. However, if you use a lower value for alpha, it means that
will be less likely to detect a true difference, if
it really exists.

2
Type II error

When the null hypothesis is false and you do not reject it, you commit a Type II error.
II. The probability of making a Type II error is β, which depends on the power.
from the test. You can reduce your risk of making a Type II error by ensuring
that the test has sufficient power. To achieve this, ensure that the size
the sample should be large enough to detect a difference
practice when it really exists.

The probability of rejecting the null hypothesis when it is false is equal to 1–β.
This value is the power of the test.

Example of type I and type II error

To understand the interrelationship between Type I and Type II errors, and to


determine which error has more severe consequences depending on the case,
consider the following example.

A medical researcher wants to compare the effectiveness of two medications. The


null and alternative hypothesis are:

Null hypothesis (H0): μ1 = μ2

The two medications have the same efficacy.

Alternative hypothesis (H1): μ1 ≠ μ2

The two medications do not have the same efficacy.

3
A type I error occurs if the researcher rejects the null hypothesis and
it concludes that the two medications are different when, in reality, they are not.
If the medications have the same effectiveness, the researcher could consider that
this error is not very serious, because nevertheless the patients would benefit
with the same level of effectiveness regardless of the medication they take.
However, if a type II error occurs, the researcher does not reject the hypothesis.
null when it should reject it. That is, the researcher concludes that the
medications are the same when in reality they are different. This mistake can
put the lives of patients at risk if the medication is put on sale less
cash instead of the most effective medication.

When conducting hypothesis testing, consider the risks of making


type I and type II errors. If the consequences of making one type of error are more
grave or costly than making the other type of mistake, then choose a level of
significance and a power for the test that reflect the relative severity of
those consequences.

Critical Values and Rejection Zone

In hypothesis testing, a critical value is a point in the distribution of


the test that is compared with the test statistic to determine if it can
reject the null hypothesis. If the absolute value of the test statistic is greater
that the critical value, you can declare statistical significance and reject the
null hypothesis. The critical values are associated with the level of significance (α),
so their values are set when the α of the test is chosen.

Critical values in the standard normal distribution for α = 0.05

4
Figure A shows that the results of a one-tailed Z test are
significant if the test statistic is equal to or greater than 1.64, the critical value
In this case, the shaded area represents 5% (α) of the area below the
curve. Figure B shows that the results of a two-tailed Z test are
significant if the absolute value of the test statistic is equal to or greater than
1.96, the critical value in this case. The two shaded areas sum up to 5% (α) of
area under the curve.

Examples of calculating critical values

In hypothesis testing, there are two ways to determine if there is


sufficient evidence based on the sample to reject H0 or not to reject
H0. The most common method is comparing the p-value with a pre-specified value.
de α, where α is the probability of rejecting H0 when H0 is true. Without
embargo, you can also compare the calculated value of the test statistic with
the critical value. The following are examples of how to calculate the critical value for
a one-sample t-test and a one-way ANOVA.

Use a one-sample t-test to calculate a critical value

Suppose you are conducting a one-sample t-test with ten


observations, it has a two-tailed alternative hypothesis (i.e., H1 is not equal to) and
está utilizando un nivel de significancia de 0.10:

Select Calc > Probability Distributions > t.


Select inverse cumulative probability.
In Degrees of freedom, enter 9 (the number of observations minus one).
In Input Constant, enter 0.95 (one less than half of the level of
significance)

This gives a critical value of 1.83311. If the absolute value of the t statistic is
greater than this critical value, then you can reject the null hypothesis, H0,
at the significance level of 0.10.

5
Use of an analysis of variance (ANOVA) to calculate a critical value

Let's suppose you are conducting a one-way ANOVA with


twelve observations, the factor has three levels and you are using a level of
significance of 0.05:

Select Calc > Probability Distributions > F.


Select inverse cumulative probability.
In numerator degrees of freedom, enter 2 (the number of levels of
factor less than one).
In denominator degrees of freedom, enter 9 (the degrees of freedom for
the error).
In Input Constant, enter 0.95 (one minus the significance level).

This gives a critical value of 4.25649. If the F statistic is greater than this
critical value, then you can reject the null hypothesis, H0, at the level of
significance of 0.05.

One-Tailed Hypothesis Test

A test of any statistical hypothesis, where the alternative is one-tailed.


how

It is called a one-tailed test.

Generally, the critical region for the alternative hypothesis θ > θ 0lies in the queue
right of the distribution of the test statistic; while the critical region
for the alternative hypothesis θ < θ0it lies in the left queue.

6
Example of One-Tailed Hypothesis Test

Example. A manufacturer of a certain brand of rice cereal claims that the


average saturated fat content does not exceed 1.5 grams. Establish the
null and alternative hypotheses to be used to test this statement and determine
where is the critical region located.

Solution. The manufacturer's claim should be rejected only if μ is greater than


1.5mg and it should not be rejected if it is less than or equal to 1.5mg. The test is of a
only the tail, the greater symbol indicates that the critical region lies in the right tail of

the distribution of our test statistic .

Two-Tailed Hypothesis Test

A test of any statistical hypothesis, where the alternative is two-tailed.


how

It is called a two-tailed test.

The critical region is divided into two parts, which often have probabilities
equal values placed at each tail of the test statistic distribution.

The alternative hypothesis θ ≠ θ0it states that either θ < θ0what θ > θ0.

7
Example of Two-Tailed Hypothesis Test

Example. A manufacturer of a certain brand of rice cereal claims that the


the average content of saturated fat does not exceed or decrease from 1.5 grams.
Establezca la hipótesis nula y alternativa a utilizar para probar esta afirmación y
determine where the critical region is located.

Solution. The manufacturer's claim should be rejected only if μ is greater than


less than 1.5mg and should not be rejected if it is equal to 1.5mg. The test is for two
queues, with the critical region equally divided between both tails of the distribution

our test statistic

Value P

It is defined as the probability of obtaining a result at least as extreme


as the one that has actually been obtained (value of the calculated statistic), assuming
that the null hypothesis is true, in terms of conditional probability:

It is essential to keep in mind that the p-value is based on the assumption of


the starting hypothesis (or null hypothesis). The p-value is therefore a measure of
statistical significance.

8
Interpretation

The null hypothesis is rejected if the p-value associated with the observed result is
equal to or less than the established significance level, conventionally 0.05 or
0.01. That is to say, the p-value shows us the probability of having obtained the result.
what we have obtained if we assume that the null hypothesis is true.

If the p-value is lower than the significance level, it indicates that it is most likely
that the starting hypothesis is false. However, it is also possible that
we are facing an atypical observation, so we would be making the mistake
statistic for rejecting the null hypothesis when it is true based on
we have had the misfortune of encountering an atypical observation. This type of
errors can be corrected by lowering the p-value; a p-value of 0.05 is used in
usual sociological investigations while p-values of 0.01 are used
in medical research, where making a mistake can lead to
more serious consequences. It can also be addressed to rectify this error
increasing the size of the obtained sample, which reduces the possibility that
the obtained data is randomly rare.

The p value is a probability value, so it ranges between 0 and 1. Thus, it is usually


saying that high p values do not reject the null hypothesis, or stated differently
correct, they do not allow rejection of H0. Likewise, low p values reject
the H0.

It is important to emphasize that a null hypothesis test does not allow for acceptance.
a hypothesis; simply accepts it or rejects it, that is to say that it labels it as
plausible (which does not necessarily mean that it is true, just that it is
more likely to be so) or implausible.

9
Exercises

A fast-drying paint manufacturer claims that the drying time


the same one is 20 min. The buyer designs the following experiment: paints 36
boards and decides to reject the product if the average drying time of the
same exceeds 20.75 min. If by experience δ = 2.4 min, it is asked what is the
probability of rejecting the sample even belonging to a population with average
of 20 min.

The probability that the average of the samples exceeds 20.75 minutes due to
randomness is calculated as follows:

With this abscissa, the probability (area to the right) is calculated, resulting in
0.0304. Graphically:

This graph is based on real, unnormalized values. For the calculation


They are used when working with tables.

Then, the probability of incorrectly rejecting the hypothesis µ=20 min is


of approximately 0.03, or 3%.

10
Now suppose that the actual average drying time is µ=21 min. Then,
the probability of obtaining a sample mean less than or equal to 20.75 (and thus
such a mistake in acceptance) is given by:

which leads to an area (to the left) of 0.2660. That is to say: the probability
The error in accepting µ=20 (despite it being µ=21) is 26.6%. Graphically:

The following table is provided as a summary:

11
The average duration of a sample of 100 fluorescent tubes produced
for a company, it amounts to 1570 hours, with a standard deviation of 120
horas. Si µ es la duración media de todos los tubos producidos por la compañía,
check the hypothesis µ = 1600 against the alternative hypothesis µ <> 1600 hours with
a significance level of 0.05.

Null Hypothesis µ = 1600 hr.

Alternative Hypothesis µ <> 1600 hr. (two-tailed)

Nivel de significancia:α=0.05.

To work with normalized tables, z is used instead of

On the other hand, Zα/2Could it be that the area under the normal to its right is α/2 and
It will be such that the area under the normal to its left is α/2. These two values define
the areas of acceptance and rejection of the Null Hypothesis. Depending on where the value falls
From the calculated z by the previous expression, acceptance or rejection will occur.

We calculate:

12
Given that -2.5 < -Z0.025The Null Hypothesis is rejected, then the average duration
the lifespan of the tubes is significantly less than 1600 hours. As can be seen
In the following graph, the sample mean falls outside the acceptance zone:

In general, the following table summarizes the different tests of null hypotheses.
µ=µ0What can be done about an average:

13
A transport company distrusts the claim that the useful life
the average of certain tires is at least 28000. To verify, 40 are placed.
tires on trucks and an average lifespan of 27463 is obtained with a
S=1348. What can be concluded from that data if the probability of Type I Error is
at most 0.01?

Null Hypothesis µ≤ 28000

Alternative Hypothesis µ > 28000 (one-tailed)

Nivel de significancia:α= 0.01.

To work with normalized tables:

We calculate:

Since -2.52 < -Z0.01the Null Hypothesis is rejected, then the useful life of the
Tires are significantly lower than 28000. As can be seen in the
the next graph, the sample mean falls outside the acceptance zone:

If the sample size is small, α is unknown and comes from a


normal population, the t-Student statistic should be used with µ=n-1 degrees of
freedom.

14
4) The average lifespan of the light bulbs produced by a company has been
in the past of 1120 hours with a standard deviation of 125 hours. A sample
Of the 8 light bulbs from the current production, the average lifespan was 1070 hours.
Test the hypothesis µ=1120 hours against the alternative hypothesis µ<1120 hours
using a significance level of α=0.05.

Null Hypothesis µ = 1120 hours.

Alternative Hypothesis µ < 1120 hours. (unilateral)

Significance level: α = 0.05.

To work with normalized tables:

With v = n-1 = 8-1 = 7 degrees of freedom. Additionally: tα -1.895 (v=7).

We calculate:

Since -1.131 > -t0.05The Null Hypothesis is accepted, then the useful life of the
Tires are significantly equal to 1120 hours. As can be seen in the
the following graph, the sample mean falls within the acceptance zone:

15

You might also like