Compute p-values, CIs, and adjust multiples
AmazonData Scientist · Technical ScreenLast updated
This question evaluates a candidate's proficiency in statistical inference, covering hypothesis testing and test selection, confidence interval construction, multiple-testing corrections, error types, and asymptotic reasoning.
Hypothesis testing and intervals in practice. Part A (z vs t): You sample n = 15 observations from a population with unknown variance and observe sample mean = 10.4 and sample standard deviation = 2.1. Test H0: mu = 9.5 vs two-sided alternative at alpha = 0.05. 1) State whether you must use a t-test or z-test and why. 2) Compute the test statistic and p-value. 3) Construct a 95% confidence interval for mu and interpret it. Part B (multiple testing): You perform 20 independent hypothesis tests at alpha = 0.05. 1) What is the expected number of false positives and the family-wise error rate if you do not adjust? 2) Apply Bonferroni to control FWER at 0.05; report the new per-test alpha. 3) In a one-way ANOVA with 4 groups where you wish to test all pairwise mean differences post hoc, explain when Tukey’s HSD is preferred over Bonferroni and what error rate it controls. Part C (errors and asymptotics): 1) Define Type I and Type II errors with a concrete example. 2) Explain CLT vs Law of Large Numbers, their assumptions, and give a scenario with heavy tails where CLT convergence is slow and how that affects inference.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.