0% found this document useful (0 votes)
1 views9 pages

Hypothesis Testing

Hypothesis testing is a statistical method used to determine the validity of an experiment's results by comparing a null hypothesis and an alternative hypothesis. It involves calculating a test statistic to decide whether to reject or fail to reject the null hypothesis, with various types of tests such as z-tests, t-tests, and chi-square tests applicable based on sample size and data type. Additionally, hypothesis testing can result in Type I and Type II errors, which represent false positives and false negatives, respectively.

Uploaded by

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

Hypothesis Testing

Hypothesis testing is a statistical method used to determine the validity of an experiment's results by comparing a null hypothesis and an alternative hypothesis. It involves calculating a test statistic to decide whether to reject or fail to reject the null hypothesis, with various types of tests such as z-tests, t-tests, and chi-square tests applicable based on sample size and data type. Additionally, hypothesis testing can result in Type I and Type II errors, which represent false positives and false negatives, respectively.

Uploaded by

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

Hypothesis Testing

Hypothesis testing is a tool for making statistical inferences about the population data. It is an
analysis tool that tests assumptions and determines how likely something is within a given
standard of accuracy. Hypothesis testing provides a way to verify whether the results of an
experiment are valid.

A null hypothesis and an alternative hypothesis are set up before performing the hypothesis
testing. This helps to arrive at a conclusion regarding the sample obtained from the population.
In this article, we will learn more about hypothesis testing, its types, steps to perform the testing,
and associated examples

Hypothesis Testing Definition:

Hypothesis testing can be defined as a statistical tool that is used to identify if the results of an
experiment are meaningful or not. It involves setting up a null hypothesis and an alternative
hypothesis. These two hypotheses will always be mutually exclusive. This means that if the null
hypothesis is true then the alternative hypothesis is false and vice versa. An example of
hypothesis testing is setting up a test to check if a new medicine works on a disease in a more
efficient manner.

1
Null Hypothesis:

The null hypothesis is a concise mathematical statement that is used to indicate that there is no
difference between two possibilities. In other words, there is no difference between certain
characteristics of data. This hypothesis assumes that the outcomes of an experiment are based on
chance alone. It is denoted as H0H0. Hypothesis testing is used to conclude if the null hypothesis
can be rejected or not. Suppose an experiment is conducted to check if girls are shorter than boys
at the age of 5. The null hypothesis will say that they are the same height.

Examples:

 A new drug has no effect compared to a placebo:


H₀: The drug’s effect = placebo’s effect

 A coin is fair (i.e., 50% heads, 50% tails):


H₀: p = 0.5

Alternative Hypothesis:

The alternative hypothesis is an alternative to the null hypothesis. It is used to show that the
observations of an experiment are due to some real effect. It indicates that there is a statistical
significance between two possible outcomes and can be denoted as H1H1 or HaHa. For the
above-mentioned example, the alternative hypothesis would be that girls are shorter than boys at
the age of 5.al

Examples:

 The drug does affect the outcome:


H₁: The drug’s effect ≠ placebo’s effect

 The coin is not fair:


H₁: p ≠ 0.5

Test Statistic:

A test statistic is a numerical value calculated from sample data during a hypothesis test. It is
used to decide whether to reject or fail to reject the null hypothesis (H₀).

2
Definition:

A test statistic measures how much the sample data differs from what we would expect if the null
hypothesis were true.It helps us compare the sample result to a theoretical distribution (like the
normal, t, or chi-square distribution) to determine if the difference is significant or due to random
chance.

🔹 Formula (General Form):

Test Statistic=Observed value−Expected value under H₀Standard error\text{Test Statistic} = \


frac{\text{Observed value} - \text{Expected value under H₀}}{\text{Standard
error}}Test Statistic=Standard errorObserved value−Expected value under H₀

This formula can change depending on the type of test (z-test, t-test, etc.).

Types of Test Statistics:

Test Used When Test Statistic

Z-test Sample size is large, population variance known Z-statistic

T-test Sample size is small, population variance unknown T-statistic

Chi-square test Categorical data (e.g., frequencies, proportions) χ²-statistic

ANOVA Comparing means of 3 or more groups F-statistic

 Hypothesis Testing Z Test:

A z test is a way of hypothesis testing that is used for a large sample size (n ≥ 30). It is used to
determine whether there is a difference between the population mean and the sample mean when
the population standard deviation is known. It can also be used to compare the mean of two
samples. It is used to compute the z test statistic. The formulas are given as follows:

 One sample: z = ¯¯¯x−μσ√nx¯−μσn.

 Two samples: z = (¯¯¯¯¯x1−¯¯¯¯¯x2)−(μ1−μ2)√σ21n1+σ22n2(x1¯−x2¯)−


(μ1−μ2)σ12n1+σ22n2

3
 Hypothesis Testing t Test:

The t test is another method of hypothesis testing that is used for a small sample size (n < 30). It
is also used to compare the sample mean and population mean. However, the population standard
deviation is not known. Instead, the sample standard deviation is known. The mean of two
samples can also be compared using the t test.

 One sample: t = ¯¯¯x−μs√nx¯−μsn.

 Two samples: t = (¯¯¯¯¯x1−¯¯¯¯¯x2)−(μ1−μ2)√s21n1+s22n2(x1¯−x2¯)−


(μ1−μ2)s12n1+s22n2.

 Hypothesis Testing Chi Square:

The Chi square test is a hypothesis testing method that is used to check whether the variables in a
population are independent or not. It is used when the test statistic is chi-squared distributed.

Hypothesis Testing Steps

Hypothesis testing can be easily performed in five simple steps. The most important step is to
correctly set up the hypotheses and identify the right method for hypothesis testing. The basic
steps to perform hypothesis testing are as follows:

 Step 1: Set up the null hypothesis by correctly identifying whether it is the left-tailed,
right-tailed, or two-tailed hypothesis testing.

 Step 2: Set up the alternative hypothesis.

 Step 3: Choose the correct significance level, αα, and find the critical value.

 Step 4: Calculate the correct test statistic (z, t or χχ) and p-value.

 Step 5: Compare the test statistic with the critical value or compare the p-value
with αα to arrive at a conclusion. In other words, decide if the null hypothesis is to be
rejected or not.

4
Example:

Suppose a company claims the average delivery time is 30 minutes. You collect a sample and
find the average is 35 minutes. You can calculate a test statistic to see if the 5-minute difference
is statistically significant or just due to chance.

Critical Region (Rejection Region):

The critical region is a range of values for the test statistic that leads to rejection of H₀. It
depends on the significance level (α), which is usually set at 0.05 (5%).

 If the test statistic falls inside the critical region → Reject H₀


 If it does not fall in the critical region → Fail to reject H₀

Example:

Suppose you're doing a two-tailed z-test with a significance level of 0.05:

 The critical region is split into two tails of the standard normal distribution.
 Each tail has 2.5% area.
 The critical values are approximately ±1.96.
 So, if your z-statistic > 1.96 or < -1.96, it falls in the critical region, and you reject H₀.

🔹 Types of Critical Regions:

Test Type Critical Region Location

One-tailed (right) Upper end of the distribution

One-tailed (left) Lower end of the distribution

Two-tailed Both ends (extreme values on both sides)

The critical region helps determine whether the evidence is strong enough to reject the null
hypothesis. It is based on the chosen significance level and type of test.

5
One Tailed Hypothesis Testing

One tailed hypothesis testing is done when the rejection region is only in one direction. It can
also be known as directional hypothesis testing because the effects can be tested in one direction
only. This type of testing is further classified into the right tailed test and left tailed test.

Right Tailed Hypothesis Testing

The right tail test is also known as the upper tail test. This test is used to check whether the
population parameter is greater than some value. The null and alternative hypotheses for this test
are given as follows:

H0H0: The population parameter is ≤ some value

H1H1: The population parameter is > some value.

If the test statistic has a greater value than the critical value then the null hypothesis is rejected

Left Tailed Hypothesis Testing

The left tail test is also known as the lower tail test. It is used to check whether the population
parameter is less than some value. The hypotheses for this hypothesis testing can be written as
follows:

H0H0: The population parameter is ≥ some value

H1H1: The population parameter is < some value.

6
The null hypothesis is rejected if the test statistic has a value lesser than the critical value.

Two Tailed Hypothesis Testing

In this hypothesis testing method, the critical region lies on both sides of the sampling
distribution. It is also known as a non - directional hypothesis testing method. The two-tailed test
is used when it needs to be determined if the population parameter is assumed to be different
than some value. The hypotheses can be set up as follows:

H0H0: the population parameter = some value

H1H1: the population parameter ≠ some value

The null hypothesis is rejected if the test statistic has a value that is not

equal to the critical value.

7
Type I and Type II Errors:

In hypothesis testing, errors can occur when making decisions about the null hypothesis (H₀).
These errors are called Type I and Type II errors.

🔹 Type I Error (False Positive)

 Occurs when the null hypothesis is true, but we reject it.


 In simple terms: We say there is an effect, but in reality, there is none.
 Probability of this error is called alpha (α) — usually 0.05 or 5%.

Example:
A pregnancy test says you're pregnant, but you're not.

In hypothesis terms:
Rejecting H₀ when H₀ is actually true.

🔹 Type II Error (False Negative)

 Occurs when the null hypothesis is false, but we fail to reject it.
 In simple terms: We say there is no effect, but in reality, there is one.
 Probability of this error is called beta (β).

8
Example:
A pregnancy test says you're not pregnant, but you are.

In hypothesis terms:
Not rejecting H₀ when H₀ is actually false.

🔹 Summary Table:

Decision H₀ True H₀ False

Reject H₀ Type I Error (α) ✅ Correct Decision

Fail to Reject
✅ Correct Decision Type II Error (β)
H₀

🔹 Visual Analogy:

Imagine a court trial:

 H₀: The person is innocent


 H₁: The person is guilty

Situation Error Type

Innocent person found guilty Type I Error (α)

Guilty person set free Type II Error (β)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy