0% found this document useful (0 votes)
17 views

Lecture 3

The document discusses hypothesis testing, including defining the null and alternative hypotheses, types of errors, performing hypothesis tests for a single mean when the population variance is known using a z-test, and identifying left-tailed, right-tailed, and two-tailed tests. Examples are provided to illustrate key concepts.

Uploaded by

muqitasamih
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Lecture 3

The document discusses hypothesis testing, including defining the null and alternative hypotheses, types of errors, performing hypothesis tests for a single mean when the population variance is known using a z-test, and identifying left-tailed, right-tailed, and two-tailed tests. Examples are provided to illustrate key concepts.

Uploaded by

muqitasamih
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Hypothesis Testing

Hypothesis:
• In statistics, a hypothesis is a conclusion about population parameter which may or may
not be true.
Null Hypothesis, (H0): This is a statement of no effect, no difference, or no association. It
represents the status quo or the default assumption. (It is the hypothesis to be tested or a
statement you want to reject/accept.)
Example: The average age of a university student is 22.
H0 = μ=22 years (Null hypothesis always contains the equality!)
Alternative Hypothesis, (HA or H1): This is a statement that contradicts the null hypothesis and
represents the effect, difference, or association you want to test. (usually your own opinion)
Example: The average age of university students is not equal to 22.
H1 = μ ≠ 22 (Alternative hypothesis never contains the equality!)
For example: According to Glassdoor, Average Salary of Data Scientist = Rs 113,000.
So, H0= μ= Rs 113,000
H1 = Salary≶$113,000
Hypothesis Testing
• Hypothesis testing is a fundamental concept in statistics used to make inferences about a
population based on a sample of data.
• It involves comparing a null hypothesis (H0) and an alternative hypothesis (Ha) to
determine whether there is enough evidence to reject the null hypothesis in favor of the
alternative hypothesis. Or
• Fail to reject the null hypothesis.
• When testing, there are two decisions that can be made: to accept the null hypothesis or
to reject the null hypothesis.
Statistical Errors:
Type I and Type II Errors:
• When we make a conclusion from a statistical test there are two types of errors that we
could make.
• They are called type 1 and type 2 errors.
• Type I error: Rejecting the null hypothesis H0 when it is true is defined as a type I error.
• Type II error: Failing to reject the null hypothesis when it is false is defined as a type II
error.
• The probability of committing Type I error (False positive) is equal to the significance level
(α).
• The probability of committing Type II error (False negative) is equal to the beta (β).
Hypothesis Test for mean when Sigma is Known:
• When we know about the population variance, we can use the z-scores for testing our
hypothesis.
• After performing z statistics, we will get a numerical value.
• Based on this value, we will decide whether to accept the null hypothesis or reject it.
• So, we need to define a critical value which will act as a threshold for the test value.
• Critical Value is the cut off value between Acceptance Zone and Rejection Zone.
• We compare our test score to the critical value.
Critical Value for Left Tailed Test:
• If the test is left tailed, the critical region, with an area equal to α will be on the left side of
the mean.
• In the left-tailed test, our rejection region consists of values that are smaller than our critical
value.
• So, If the test value is less than our critical value, we will reject the null hypothesis

Critical Value for Right Tailed Test:


• If the test is right tailed, the critical region, with an area equal to α will be on the right side
of the mean.
• In the right-tailed test, our rejection region consists of values that are greater than our
critical value.
• So, If the test value is greater than our critical value, we will reject the null hypothesis.

Critical Value for Non-Directional/Two Tailed Test:


• If the test is two tailed/non directional, α must be divided by 2.
• One half of the area will be to the right of the mean and one half will be to the left of the
mean
• If the test score is not in the shaded region, that means the test score lies in the Acceptance
Zone and we fail to reject the null Hypothesis.
• Reject Null Hypothesis if the test statistic is extreme, either larger than an upper critical
value or smaller than a lower critical value.

Finding the Z value for α:


• For a left tailed test, use the z value that corresponds to the area equivalent to α in the z-
table (negative z).
• For a right tailed test, use the z value that corresponds to the area equivalent to 1- α
• For a two tailed test, use the z value that corresponds to α/2 for the left value. This will be
a negative value. For the right value, use the z value that corresponds to α/2. It will be
positive.
Example:
• Is the average monthly rent of a one-bedroom apartment in State College, Pennsylvania
less than $900? What type of problem is this? Which test will be used? What is the null
and alternative hypothesis?
• In this question we are comparing the mean of all State College one-bedroom apartments
(i.e. μ ) to the value of $900. This is a single sample mean test. We want to know if the
population mean is less than $900, so this is a left-tailed test.
• Our hypotheses are H0 : μ = 900, H1 : μ <900
Example:
• Is the average IQ score of all World Campus STAT 200 students higher than the
national average of 100?
• What type of problem is this? Which test will be used? What is the null and
alternative hypothesis? In this question we are comparing the mean of all World
Campus STAT 200 students (i.e. μ ) to the given value of 100. This is a single sample
mean test. We want to know if the population mean is greater than 100, so this is a
right-tailed test.
• Our hypotheses are: H0 : μ = 100, H1 : μ >100
Steps to Perform Hypothesis Testing:
• State the null hypothesis and alternative hypothesis and identify the claim.
• Select a probability of error level (alpha level).
• Calculate test value.
• Find the critical value using z/t table.
• Make the decision and interpret the results.

You might also like