Alice took a test with 100 Yes/No questions (a very long one!).
Note that \(Y=\frac{X_1+\ldots+X_{100}}{100}\) where \(X_i\sim Bernoulli(p)\). Thus \(E(Y) = p\) and \(Var(Y) = \frac{p(1-p)}{n}.\)
From the CLT we get that \(Y\sim Normal(p,\frac{p(1-p)}{n})\).
\(E(Y) \approx \frac{65}{100}=0.65\) and \(Var(Y) \approx \frac{0.65(1-0.65)}{100}= 0.002275\)
\([0.65-1.96\cdot\sqrt{0.002275},0.65+1.96\cdot\sqrt{0.002275}] =[0.557,0.743]\)
\(p=0.5\).
As it [0.557,0.743] does not cover \(0.5\), it is unlikely that Alice randomly guessed the answers.
The 99% confidence interval is:
\([0.65-2.58\cdot\sqrt{0.002275},0.65+2.58\cdot\sqrt{0.002275}] =[0.527,0.773].\)
It is wider than the 95% confidence interval.
Yes we are.
Elon Musk wants to estimate the average salary in startups in the Silicone Valley.
Since \(X\sim Uniform(150,400)\) then \(E(X) = \frac{150+450}{2}=300\) and \(Var(X)=\frac{(450-150)^2}{12}=7500\).
From the CLT \(Y\sim Normal(300,\frac{7500}{30}) = Normal(300, 250)\).
salary
## [1] 229.7 261.6 321.9 422.5 210.5 419.5 433.4 348.2 338.7 168.5 211.8 203.0
## [13] 356.1 265.2 381.0 299.3 365.3 447.6 264.0 383.2 430.4 213.6 345.5 187.7
## [25] 230.2 265.8 154.0 264.7 410.9 252.1
He computed the mean of this sample:
mean(salary)
## [1] 302.8633
In addition, an insider shared that the variance of the salary in a Silicone Valley startup is \(7500\).
Use this information to help Elon Musk computing the 80% confidence interval for the average salary in startups in the Silicone Valley.
Since the theoretical variance is known, we use Normal distribution table and get
\([302.86-1.28\cdot{\sqrt{\frac{7500}{30}}}, 302.86+1.28\cdot{\sqrt{\frac{7500}{30}}}]=[282.62, 323.1]\)
More than 323.1.
var(salary)
## [1] 7847.569
Use this information to help Elon Musk computing the 80% confidence interval for the average salary in startups in the Silicone Valley. Did we get wider confidence interval?
Since the theoretical variance is unknown, we use t-distribution table and get
\([302.86-1.31\cdot{\sqrt{\frac{7847.57}{30}}}, 302.86+1.31\cdot{\sqrt{\frac{7847.57}{30}}}]=[282.15, 323.57]\).
Yes, it is slightly wider.