Compute decay, OLS, and classic probability results
UpstartData Scientist · OnsiteLast updated
This question evaluates probability and statistical modeling skills—probabilistic reasoning for exponential decay and the coupon-collector expectation, derivation of population OLS coefficients for simple linear models, simulation implementation, and conditional probability reasoning exemplified by the Monty Hall scenario.
You are asked several probability/statistics questions.
1) Radioactive decay (half-life)
A radioactive atom has a half-life of 1 day. Assume each atom decays independently and decay follows an exponential distribution.
- If you start with n = 100 atoms, what is the probability distribution of the number of atoms still alive after m = 10 days?
- Compute:
- the expected number of atoms still alive after 10 days
- the probability that at least one atom is still alive after 10 days
- Write a simulation: input m (days) and n (number of atoms) and output the final state of each atom (e.g., 1 = alive, 0 = decayed) after m days.
2) Population OLS coefficients
Let
- (y = x + \varepsilon)
- (x \sim \mathcal{N}(0,1)), (\varepsilon \sim \mathcal{N}(0,1))
- (x) and (\varepsilon) are independent.
Compute the population OLS slope (and intercept) for:
- Regression A: (y) on (x) (i.e., (y \sim x))
- Regression B: (x) on (y) (i.e., (x \sim y))
3) Monty Hall
In the classic Monty Hall problem with 3 doors (1 prize, 2 goats), after you pick a door the host opens a different door showing a goat and offers you the chance to switch.
What is the probability of winning if you switch vs if you stay? Briefly justify.
4) n-sided die: time to see all faces
You roll a fair die with n faces repeatedly.
What is the expected number of rolls required to observe all n faces at least once?
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.