1/24
Looks like no tags are added yet.
Steps of Hypothesis Testing
Make an Initial Assumption: Make an initial assumption about the population mean mu. There might be a claim, historical information that can be used to make an initial assumption based on the knowledge that you might have.
Initial assumption: H0 mu = 60 seconds. In general, an initial assumption is mu = mu(SD). H notation.
mu is not something that you can usually calculate because your population is large.
Hypothesizing that the actual mean = 60 seconds, however, this is not the actual mean.
Create a Claim: Create a claim (hypothesis) that you are trying to find evidence in support of. Based on historical information, the mu was 60, but a new implementation of service was put in place to speed up the service time. New average service time is now less than 60 seconds.
Alternative hypothesis: Ha. This is a statement of the population mean, but what are you trying to find evidence in support of? Evidence in support of the mean being less than 60 seconds.
H0: Null Hypothesis
Null Hypothesis Testing
If something happens that would be very unlikely if the null hypothesis (H₀) were true, it suggests that the null hypothesis might be false.
If the results are very surprising, assuming nothing is happening, that's evidence that something might actually be happening.
Example:
H₀: A coin is fair (50% heads, 50% tails).
You flip it 100 times and get 95 heads.
Getting 95 heads would be extremely unlikely if the coin were fair.
Therefore, you have evidence that the coin might not be fair.
Unusual results = evidence against H₀ (the null hypothesis).
It doesn't automatically prove H₀ is false; it just gives us reason to question it.

Null Hypothesis H0
A very specific statement about the parameter of a population. This is the statement that we would like to find evidence against.
Read the story, and identify what is the claim that we are trying to find evidence in support of.
The claim is the claim in Ha. There will always be a statement of “no difference” or “no effect.” Always in terms of equality.

Initial Hypothesis
Null hypothesis, this is the inital claim that is being made (H0).
Either you reject the intital claim being made, or your not able to reject the intital claim. Cannot say that you proved it, you must say you reject it or were not able to reject it.
Alternative Hypothesis
Main Goal of Hypothesis Testing
Main point to to try to find evidence in support of Ha (Alternative Hypothesis).
Do we have enough evidence that the true mean service time after the implementation has decreased by less than 60 seconds?
Or whatever you prediction is.
How do you find evidence in support of something about the population mean?
Collect a sample and you can look at the value of x(bar) in the sample.
A sample of 15 cars has an average time after the new service routine is implemented in 56.9 seconds.
One sample: n = 15, x(bar) = 56.9 seconds. We have no idea where the 56.9 seconds comes from in the larger sampling distribution of many samples. Even if you have a good simple random sample, you might have 15 cars that are just faster than the normal amount of cars. We cannot look at 56.9 and compare it to 60 seconds.
Instead, we have to look at the sampling distribution of x(bar). We do not know mu anymore, so we cannot say that it is centered at mu. This is the sampling mu of x(bar) under the assumption that mu = 60.
Major Concept of Hypothesis Testing
An outcome that would rarely occur if an assumption were true is good evidence that the assumption is not true.
Assuming the population mean.
Observing your sample mean. How far is 56.9 from 60?
If you make an assumption about something, and then you observe something very rare to happen under your assumption, this tells you that your assumption could be wrong.
60 is not the actual mean, it is just the initial assumption that you are starting with.
P(X(bar) < 56.9 | u = 60)
What does this mean?
What is the probability I would get an x(bar) as least as low as 56.9, if the true mean were 60?
Vertical bar: | means given that.
As least as low: 56.9 or lower.
Probability can be small or large.
What ar Two Possible Scenarios for P(X(bar) < 56.9 | u = 60)
Entire point of hypothesis testing, is that we want to find evidence in support of our claim.
If the probability is “small enough” then reject H0 (mu = 60), and we have sufficient evidence that mu is less than 60.
If you reject the intial assumption this means that we have found sufficient evidence to support our claims.
Sufficient evidence that mu is less than 60.
Must define a threshold for how small something is required to be (significance level).
We will not reject hypothesis H0, if the probability is “not too small.” Then we have to go back and make a statement in reference to the claim that we were trying to make.
Go back and answer the question.
Do not reject hypothesis H0.
We do not have sufficient (or insufficient) evidence that mu is less than 60.
Significance Level
If the probability is “small enough” then reject H0 (mu = 60), and we have sufficient evidence that mu is less than 60. Must define a threshold for how small something is required to be (significance level).
Usually will be 0.01%, 0.05%, 0.10%.
We can think of alpha as the maximum p-value for which the H0 will be rejected.
P-value
We assume the null hypothesis (H0) is true and calculate the probability of observing a value of the sample mean at least as extreme as the one observed. This is called the p-value of the test.
The probability we calculated is called a p-value.
We reject the initial assumption (H0 null hypothesis), if your p-value is small enough. Smaller than the predefined threshold of alpha (significance level).
Lower p-value: The lower the p-value the less likely it would have been to observe a value at least as extreme as the one observed if the hypothesis were true. The lower the p-value the stronger the evidence against the null hypothesis (H0).
If the p-value is lower than the significance level.
Higher p-value: If the p-vlaue is greater than the significance level, then we fail to reject the H0.
Population Parameters
What is the possible outcomes of the null hypothesis?
We never say Accept H0 or reject Ha. We instead say:
Reject H0: If the p-value < alpha, then we have sufficient evidence in favour of Ha.
If the p-value is less than or equal to alpha we reject H0.
Fail to reject H0: If the p-value > alpha, in which case we have insufficient evidence in favour of Ha.
If p-value is greater than alpha, then we fail to reject H0.
Null Hypothesis (H0) Testing Example
An outcome that would rarely occur if an assumption were true is good evidence that the assumption is not true.
For example if someone tells you that P(H) = 0.5, and the actual P(H) = 0.7 (not disclosed).
Flip coin 10x: Observe 7 heads. Does not rarely occur, this can happen.
Flip coin 100x: Observe 70 heads.
Flip coin 1000x: Observe 700 heads. Rarely occurs.
Was told to make an initial assumption (50% chance of getting a head), an outcome that would rarely occur based on that initial assumption of 50%.
Conclude that this is not a fair coin and that someone is lying. This illustrates that you the assumption that the coin is not fair is true.
Process of Finding the Hypothesis
H0 and Ha are always written in terms of population parameters. Claim has to be in terms of mu, not x(bar).
Find the evidence in the story: What are you trying to find evidence for in the story?
Find out what type of claim it is in the story (less than, greater than or equal sign).
Write the null hypothesis H0. Statement about the parameter of the population.
Identify: Write the exact same thing (sign) in H0 with an = sign.
Three Types of Claims
True mean is less than some value:
True mean is more than some value:
A claim that the true mean is different from some value:


Find the claim: The true mean nicotine content is greater than 1.4 mg. Write Ha first, even though by convention we are supposed to write H0 first. Ha: mu > 1.4
Rewrite H0: The exact same thing with an = sign. H0: mu = 1.4


Find the claim: Find evidence that the actual amount of medication in the drug is significantly different than the claimed amount.
Ha: mu =/ 10
We are saying mu is different, not equal to 10, and H0 is the same thing with an = sign.
H0: mu = 10

Steps
State the significance level.
State H0 and Ha.
H0: Will look like mu = some value. Value is called mu0.
Ha: Will look different depending on the problem. Whole point of why we are conducting the hypothesis analysis.
Three possible alternative hypothesis.
Decision rule: Reject H0 if the p-value is less than or = to alpha. Telling you when are you going to decide to reject the null hypothesis and you have found sufficient evidence for your alternative hypothesis.
Calculate the test statistic (using the formula) with mu0.
Calcuate the p-value.
Depending on the three different possible alternative hypotheses that you have (less than, greater than, equal to), there are three different ways to calculate the p-value. Shown on slide 16.
Conclusion: Do you reject H0 or fail to reject H0. There are two parts to the conclusion, and you must write both parts.
Reject H0, fail to reject H0, so we have insufficient evidence in favour of Ha.
We have sufficient evidence in favour of Ha.
P-value interpretation:
X = drive thru service time. Assume X ~ N(mu, 10)
Initial assumption: mu = 60
In general: mu = muo
Alpha = 0.05
Scenario
Collect the sample. Look at the value of x(bar). n = 15 x(bar) = 56.9.
Sampling distribution of x(bar), under the assumption that mu is equal to 60.
Calculate the probability (p-value): P(xbar < 56.9 | mu =60). Probability is called the p-value. How you calculate the probability will depend on what sign you have.
Left-tailed test Ha: μ < μ0 P(Z < z)
Right-tailed test: Ha:μ > μ0 P(Z > z)
Two-tailed test Ha:μ ≠ μ0 2P(Z > ∣z∣)
Caluclate the amount using the proper formula. -1.20 (test statistic).
In this case P(Z < -1.20) = 0.1151
Assume we are given alpha = 0.05
P-value (0.1151) is greater than alpha. So we fail to reject H0, so we have insufficient evidence that the true mean service time is less than 60. Even though x(bar) was 56.9, we do not have enough evidence that the true mean in the population is less than 60. Sample to sample variability plays a role.
P-value interpretation: If the null hypothesis were true, (if the true mean were equal to the value mu0), then the probability of observing a sample mean at least as low/high/extreme as (the value of xbar) is (the calculated p-value).
If the true mean service time were equal to 60 seconds, then the probability of observing the sample mean as least as low as 56.9 (xbar) is 0.1151.
Steps to Calculate a p-value (probability)
Calculate the probability (p-value): P(xbar < 56.9 | mu =60). Probability is called the p-value.
Calculate a z-score: z-score was x(bar) - mu/ sigma sqrt n.
x(bar) = 56.9
SD = 10
mu = ?
We cannot plug in anything for mu now. From unit 7, we made the unrealistic assumption that we know the true population mean. However, now we are making the more realistic assumption that we do not know the true population mean, and we are trying to learn about it.
We do not have mu, so we instead plug mu0. This will give you a test statistic (z-score).
How you calcuate the p-value will depend on what sign you have.
Left-tailed test Ha: μ < μ0 P(Z < z)
Right-tailed test: Ha:μ > μ0 P(Z > z)
Two-tailed test Ha:μ ≠ μ0 2P(Z > ∣z∣)

P-value Interpretation
If the null hypothesis were true, (if the true mean were equal to the value mu0), then the probability of observing a sample mean at least as low/high/extreme as (the value of xbar) is (the calculated p-value).
Low: Term used for the left-sided tests.
High: Term used for the right-sided tests.
Extreme: For two-sided tests.