← Databricks Interview Insights
I knew this was a two-sided z-test for a proportion but I fumbled the variance formula for a second.
Start by clearly stating the null and alternative hypotheses, then compute the z-test statistic for a proportion using the normal approximation to the binomial. Calculate the two-sided p-value, compare it to the 0.05 significance level, and conclude whether the coin is fair, while noting any assumptions and practical implications.
Pro tip: Mention that with 1000 flips, the normal approximation is valid, and briefly discuss the effect size (560 vs 500) to show you understand both statistical and practical significance.
Define the null hypothesis (H0: p = 0.5, the coin is fair) and the alternative hypothesis (Ha: p ≠ 0.5, the coin is not fair). Specify that this is a two-sided test.
Verify that np0 ≥ 10 and n(1-p0) ≥ 10 to use the normal approximation. Calculate the z-statistic: z = (p_hat - p0) / sqrt(p0(1-p0)/n), where p_hat = 560/1000 = 0.56.
Find the two-sided p-value using the standard normal distribution: p-value = 2 * P(Z > |z|). For z ≈ 3.79, the p-value is approximately 0.00015.
Compare the p-value to the significance level α = 0.05. Since p-value < 0.05, reject the null hypothesis. Conclude that there is sufficient evidence to suggest the coin is not fair.
Note that the observed proportion (0.56) is 12 percentage points away from 0.5, which may be practically significant. Mention that the test assumes independent flips and a fair comparison, and consider confidence intervals for the true proportion.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.