Hypothesis Testing & p-values Flashcards

(38 cards)

1
Q

What is the basic goal of hypothesis testing?

A

To assess whether observed data are compatible with a specified null hypothesis about a population or model parameter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a null hypothesis H₀?

A

A default assumption or claim about a parameter or distribution, such as ‘no effect’ or ‘no difference’ between groups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an alternative hypothesis H₁?

A

A competing claim that would be supported if the evidence is strong enough against the null, such as ‘there is a difference’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a test statistic in hypothesis testing?

A

A function of the data that measures the degree of discrepancy between the observed data and what would be expected under H₀.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a p-value?

A

The probability, under the null hypothesis, of observing a test statistic at least as extreme as the one computed from the data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Does a small p-value prove that the null hypothesis is false?

A

No; it indicates that the observed data would be unusual under H₀, but does not provide a direct probability that H₀ is true or false.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a significance level α (alpha)?

A

A chosen threshold such as 0.05, representing the maximum tolerable probability of rejecting H₀ when it is actually true (Type I error).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a Type I error?

A

Rejecting a true null hypothesis (a false positive).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a Type II error?

A

Failing to reject a false null hypothesis (a false negative).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is statistical power?

A

The probability of correctly rejecting H₀ when it is false; i.e., 1 − (Type II error rate).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Why is power important in experimental design?

A

Low power means that even real effects are unlikely to be detected, leading to wasted experiments and misleading ‘no effect’ conclusions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What factors increase the power of a test?

A

Larger sample size, larger true effect size, lower variance, and higher significance level (all else equal).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why is ‘p<0.05’ not a magic threshold?

A

It is a convention; real decisions should consider effect size, uncertainty, costs of errors, and context, not just a binary cutoff.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is multiple testing or multiple comparisons?

A

Running many hypothesis tests, which increases the chance of getting at least one small p-value by random chance even when all nulls are true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why is multiple testing a concern in ML and analytics?

A

Trying many models, features, or metrics and only reporting the best results can lead to overoptimistic conclusions and p-hacking.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an A/B test at a high level?

A

A controlled experiment comparing outcomes between a control group (A) and a treatment group (B) to assess the effect of a change.

17
Q

What is randomization in A/B testing?

A

Assigning units to groups at random so that, on average, groups are comparable and confounders are balanced.

18
Q

Why is randomization critical for causal interpretation?

A

It breaks systematic links between treatment assignment and other variables, making differences in outcomes attributable to the treatment with fewer assumptions.

19
Q

What are typical units of randomization in online A/B tests?

A

Users, sessions, or requests, depending on the product and outcome being measured.

20
Q

Why is ‘stable unit treatment value’ (roughly) important in experiments?

A

It assumes one unit’s outcome is not affected by another unit’s treatment, simplifying interpretation; interference can complicate A/B test analysis.

21
Q

What is a lift in A/B testing?

A

The relative change in a metric between treatment and control, often expressed as a percentage increase or decrease.

22
Q

What is the difference between statistical significance and practical significance?

A

Statistical significance is about whether an effect is unlikely under H₀; practical significance is whether the effect size is large enough to matter in practice.

23
Q

Why is it dangerous to stop an experiment as soon as p<0.05 without planning?

A

Repeated peeking at results inflates Type I error; you effectively perform multiple tests without correction.

24
Q

What is a pre-analysis plan or fixed-horizon test?

A

A plan that specifies sample size, metrics, and decision rules in advance and analyzes data only after reaching the planned sample size.

25
What is sequential testing or online testing?
Approaches that allow monitoring results over time with statistical corrections to maintain valid error rates when checking repeatedly.
26
Why is sample size planning important before running an A/B test?
To ensure that the experiment has enough power to detect the minimum effect size of interest without running excessively long or short.
27
What inputs are typically needed for rough sample size calculations?
Baseline metric level, minimum detectable effect size, desired power, and significance level.
28
What role does variance play in experiment design?
Higher variance in the metric requires larger sample size to detect the same effect with the same power.
29
Why can observational differences between groups be misleading without randomization?
Groups may differ in many ways besides the treatment, so differences in outcomes may be due to confounders rather than the treatment itself.
30
What is a confounder?
A variable that influences both the treatment and the outcome, potentially creating a spurious association.
31
What is a simple way to reduce confounding in observational analysis?
Control for known confounders via stratification, matching, or regression, while recognizing that unknown confounding may remain.
32
Why are experiments still preferred when feasible, even with advanced observational methods?
Experiments provide cleaner identification of causal effects under simpler, more transparent assumptions.
33
In ML model evaluation, what is an informal 'hypothesis test'?
Assessing whether one model’s performance metric is substantially better than another’s beyond what could be expected from random variation in the test set.
34
Why is it useful to think of model comparisons as noisy estimates rather than exact ranks?
Performance metrics on finite data have sampling variability; small differences may be indistinguishable from noise.
35
What is a good practice when comparing models using metrics?
Report point estimates with confidence intervals or uncertainty estimates, and consider business impact, not just statistical significance.
36
What is p-hacking?
Manipulating analysis choices or repeatedly testing until a desired p-value is obtained, inflating false discovery rates.
37
How can teams reduce p-hacking risk?
Pre-registering analysis plans, limiting post-hoc choices, correcting for multiple comparisons, and emphasizing effect sizes and uncertainty.
38
In one sentence, what should an ML engineer remember about hypothesis tests and p-values?
They are tools for quantifying evidence under a model, not definitive answers; combine them with effect sizes, uncertainty, and domain context when making decisions.