Hypothesis Testing Framework
- 28Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the null hypothesis (H₀) in hypothesis testing?
What is the null hypothesis (H₀) in hypothesis testing?
28 questions
- 1
What is the null hypothesis (H₀) in hypothesis testing?
- A
The default reality or status quo
- B
The probability of seeing your data if the alternative is true
- C
The maximum risk you're willing to take of being wrong
- D
The exciting new theory you want to prove
Correct answer
AThe default reality or status quo
Explanation
The null hypothesis represents the boring status quo, the default reality that we assume until evidence suggests otherwise.
- A
- 2
What does the significance level (α) represent?
- A
The probability of seeing your data if the null is true
- B
The probability of rejecting the null when it is true
- C
The maximum risk you are willing to take of being wrong
- D
The threshold for accepting the alternative hypothesis
Correct answer
CThe maximum risk you are willing to take of being wrong
Explanation
Alpha is the BS threshold, the maximum risk of making a Type I error that you are willing to accept, typically set at 0.05.
- A
- 3
What is the correct order of steps in the universal hypothesis testing algorithm?
- A
Formulate, Compute, Calibrate, Decide
- B
Formulate, Calibrate, Compute, Decide
- C
Compute, Formulate, Calibrate, Decide
- D
Calibrate, Formulate, Compute, Decide
Correct answer
BFormulate, Calibrate, Compute, Decide
Explanation
The four steps are: (1) Formulate H₀ and H₁, (2) Calibrate alpha, (3) Compute the test statistic, (4) Decide based on p-value vs alpha.
- A
- 4
When do you reject the null hypothesis?
- A
When the p-value is greater than α
- B
When the p-value is greater than 0.05
- C
When the p-value is less than α
- D
When the p-value equals α
Correct answer
CWhen the p-value is less than α
Explanation
If the p-value is less than the significance level alpha, we reject the null hypothesis because the result is too unlikely to be due to chance.
- A
- 5
What does a p-value represent?
- A
The maximum acceptable risk of a Type I error
- B
The probability of observing your data or more extreme if the null hypothesis is true
- C
The probability that the alternative hypothesis is true
- D
The probability that the null hypothesis is true
Correct answer
BThe probability of observing your data or more extreme if the null hypothesis is true
Explanation
The p-value is the probability of getting results as extreme as the observed data, assuming the null hypothesis is correct.
- A
- 6
In the coin flip example, with 9 heads out of 10 flips and assuming a fair coin, what was the calculated p-value?
- A
0.0010
- B
0.0976
- C
0.05
- D
0.0107
Correct answer
D0.0107
Explanation
The probability of 10 heads is 0.510≈0.0009766, and 9 heads is 10×0.510≈0.0097656. Summing gives 0.0107.
- A
- 7
In the coin flip example, if the p-value is 0.0107 and α=0.05, what is the conclusion?
- A
The test is inconclusive
- B
Accept H1; the coin is fair
- C
Fail to reject H0; the coin is fair
- D
Reject H0; the coin is rigged
Correct answer
DReject H0; the coin is rigged
Explanation
Since 0.0107<0.05, we reject the null hypothesis that the coin is fair. The result is statistically significant.
- A
- 8
What does the Central Limit Theorem guarantee?
- A
The raw data will always be normally distributed
- B
The sample mean will be normally distributed for large sample sizes regardless of the population distribution
- C
The population standard deviation is known
- D
The sample mean equals the population mean
Correct answer
BThe sample mean will be normally distributed for large sample sizes regardless of the population distribution
Explanation
The Central Limit Theorem states that the sampling distribution of the sample mean approaches a normal distribution as sample size increases, even if the population distribution is not normal.
- A
- 9
In the Z-test formula, what does the denominator represent?
- A
The noise, or standard error
- B
The signal
- C
The effect size
- D
The p-value
Correct answer
AThe noise, or standard error
Explanation
The denominator σ/n is the standard error, which measures the natural variation in the sample mean.
- A
- 10
In the chip factory example, what was the calculated Z-score?
- A
0.71
- B
1.49
- C
2.00
- D
2.83
Correct answer
D2.83
Explanation
Z=5/50102−100=0.70712≈2.83.
- A
- 11
In the Z-test for the chip factory, why was the test two-tailed?
- A
Because the alternative hypothesis was that the mean is not equal to 100
- B
Because the sample size was 50
- C
Because the sample mean was greater than 100
- D
Because the population standard deviation was known
Correct answer
ABecause the alternative hypothesis was that the mean is not equal to 100
Explanation
The alternative hypothesis H1 was that the machine is broken (μ=100), so we consider deviations in both directions.
- A
- 12
When is a t-test preferred over a Z-test?
- A
When the sample size is small and the population standard deviation is unknown
- B
When the data is categorical
- C
When the sample size is large
- D
When the population standard deviation is known
Correct answer
AWhen the sample size is small and the population standard deviation is unknown
Explanation
The t-test is used when the population standard deviation is unknown and must be estimated from the sample, which introduces extra uncertainty, especially with small samples.
- A
- 13
In the new button A/B test example, why did the t-test fail to reject the null hypothesis?
- A
The sample standard deviations were unequal
- B
The signal was too small
- C
The noise was too large relative to the signal
- D
The p-value was exactly 0.05
Correct answer
CThe noise was too large relative to the signal
Explanation
With small sample sizes (n=10 per group), the noise (standard error) was large, giving a t-score of only 1.49 and a p-value of 0.15, which is above α=0.05.
- A
- 14
What are the two ways to increase the power of a t-test?
- A
Increase sample size or increase effect size
- B
Decrease alpha or increase sigma
- C
Use a one-tailed test
- D
Decrease sample size or increase effect size
Correct answer
AIncrease sample size or increase effect size
Explanation
To increase power, you can either increase the effect size (signal) or increase the sample size to reduce noise. Both make it easier to detect a true effect.
- A
- 15
What type of data is the chi-square test used for?
- A
Categorical data like clicks or conversion
- B
Binary data only
- C
Continuous data like time and revenue
- D
Ordinal data like rankings
Correct answer
ACategorical data like clicks or conversion
Explanation
The chi-square test is designed for categorical (discrete) data, such as counts or proportions in categories.
- A
- 16
In the chi-square test, what does the expected table represent?
- A
The minimum expected counts for validity
- B
The maximum possible values
- C
What would be observed if the null hypothesis were true
- D
The observed data from the experiment
Correct answer
CWhat would be observed if the null hypothesis were true
Explanation
The expected table shows what we would expect to see if the null hypothesis (no difference between groups) were true, based on the overall averages.
- A
- 17
In the red button test, what was the calculated chi-square statistic?
- A
1.67
- B
0.0477
- C
2.83
- D
3.92
Correct answer
D3.92
Explanation
χ2=15(10−15)2+15(20−15)2+85(90−85)2+85(80−85)2=1.67+1.67+0.294+0.294=3.92.
- A
- 18
What is p-hacking?
- A
Repeatedly checking the p-value during an experiment and stopping early when it becomes significant
- B
Failing to set a significance level
- C
Using a p-value greater than 0.05
- D
Using a chi-square test on continuous data
Correct answer
ARepeatedly checking the p-value during an experiment and stopping early when it becomes significant
Explanation
P-hacking involves peeking at the p-value during the experiment and stopping as soon as it falls below the threshold, which invalidates the test's assumptions.
- A
- 19
What is the recommended practice to avoid p-hacking?
- A
Pre-commit to a sample size and do not peek until the experiment ends
- B
Always use a one-tailed test
- C
Run the experiment for at least one week
- D
Use a higher alpha like 0.10
Correct answer
APre-commit to a sample size and do not peek until the experiment ends
Explanation
The professional approach is to pre-commit to a sample size, run the test without peeking, and check the p-value only once at the end.
- A
- 20
In the Google problem, why was the change not launched despite a very low p-value?
- A
The effect was not statistically significant
- B
The p-value was incorrectly calculated
- C
The effect was not practically significant
- D
The sample size was too small
Correct answer
CThe effect was not practically significant
Explanation
A 0.001-second improvement is statistically significant due to large sample size, but it is practically insignificant because it provides no real-world value.
- A
- 21
What should you always check before making a decision based on a hypothesis test?
- A
Only the effect size
- B
Both the p-value and the effect size
- C
Only the p-value
- D
The sample size and the standard deviation
Correct answer
BBoth the p-value and the effect size
Explanation
Statistical significance (p-value) tells you if the effect is real; practical significance (effect size) tells you if it matters. Both are necessary for a good decision.
- A
- 22
What does practical significance refer to?
- A
The sample size required
- B
The statistical significance of the result
- C
The p-value threshold
- D
The magnitude of the effect and whether it matters in the real world
Correct answer
DThe magnitude of the effect and whether it matters in the real world
Explanation
Practical significance asks whether the effect is large enough to be meaningful, regardless of whether it is statistically significant.
- A
- 23
In the Google problem, why was the p-value extremely small despite a tiny effect?
- A
Because the test was misapplied
- B
Because the sample size was huge
- C
Because the alternative hypothesis was one-tailed
- D
Because the effect size was large
Correct answer
BBecause the sample size was huge
Explanation
With a very large sample size (e.g., 50 million), even a minuscule difference becomes statistically significant because the test has high power.
- A
- 24
According to the decision matrix, which test should be used for continuous data when asking if the average differs from a target, and the population standard deviation is known?
- A
Two-sample t-test
- B
Paired t-test
- C
Chi-square test
- D
One-sample Z-test
Correct answer
DOne-sample Z-test
Explanation
When the population standard deviation is known, the one-sample Z-test is appropriate for testing whether the mean differs from a target value.
- A
- 25
According to the decision matrix, which test should be used for categorical data when asking if conversion rates differ between groups?
- A
ANOVA
- B
Chi-square test
- C
Z-test
- D
t-test
Correct answer
BChi-square test
Explanation
For categorical data like conversion rates, the chi-square test of independence is the correct tool to compare observed frequencies across groups.
- A
- 26
In the
binom.testfunction in Python'sscipy.stats, what does the parameteralternative='greater'represent?- A
The test is two-tailed
- B
The test is one-tailed (greater side)
- C
The test is for greater sample sizes
- D
The alternative hypothesis is that the proportion is less than null
Correct answer
BThe test is one-tailed (greater side)
Explanation
Setting
alternative='greater'specifies a one-tailed test for the alternative that the true proportion is greater than the null value, used here to compute the probability of 9 or more heads. - A
- 27
In Python's
scipy.stats, which function is used to perform a two-sample t-test?- A
ttest_ind - B
binom.test - C
ttest_1samp - D
ttest_rel
Correct answer
Attest_indExplanation
ttest_indis the independent two-sample t-test, used to compare means of two independent groups. - A
- 28
In Python's
scipy.stats, which function is used for a chi-square test of independence?- A
chisquare - B
contingency.chi2 - C
chi2_test - D
chi2_contingency
Correct answer
Dchi2_contingencyExplanation
chi2_contingencyperforms a chi-square test of independence on a contingency table of observed counts. - A

Ask anything
We've read this whole study set, so questions about it get the best answers.