Cheat Sheet Module 2#
*** - denotes IMPORTANT
Estimators#
General Notations
\(\hat{}\) (hat) - denotes an estimated value.
\(\bar{}\) (bar) - denotes sample mean.
\(n\) - denotes sample size
\(\bar{x} = \frac{1}{n}\sum_{i=1}^n x_i\)
\(s^2 = \frac{1}{n-1}\sum_{i=1}^n (x_i - \bar{x})^2\)
Normal Distribution \(x \sim \mathcal{N}(\mu,\sigma^2)\) ***#
*** \(\bar{x} \sim \mathcal{N}(\mu,\frac{\sigma^2}{n}) \implies \hat{\mu} = \bar{x}\) (Unbiased)
\(\frac{\bar{x} - \mu}{\sigma/\sqrt{n}} \sim \mathcal{N}(0,1)\)
\(\frac{\bar{x} - \mu}{s/\sqrt{n}} \sim t(n-1)\) (read as “t-distribution or Student’s t-distribution with n-1 degrees of freedom)
\(s^2 \sim \frac{\sigma^2}{n-1}\chi^2(n-1)\) (“Scaled Chi-squared” Distribution) \(\implies \hat{\sigma^2} = s^2\)
\(\hat{\sigma} = \frac{s}{c_4}\) (from chart)
\(\hat{\sigma} = \frac{R}{d_2}\) (from chart)
*** Biased \(\hat{\sigma} = s\)
Bernoulli Distribution \(x \sim Bernoulli(p)\)#
\(\bar{x} \sim \mathcal{N}(p,\frac{p(1-p)}{n}) \implies \hat{p} = \bar{x}\) (Unbiased, for a large sample size \(n\))
*** Bernoulli-Binomial relationship
If \(x \sim Bernoulli(p)\) and we do \(K\) trials and let \(y = \sum_{i=1}^{K}x_i\) (i.e., the sum will give the number of successes in \(K\) trials)
Then, \(y \sim \mathcal{B}(K,p)\)
Binomial Distribution \(x \sim \mathcal{B}(N,p)\)#
\(\bar{x} \sim \mathcal{N}(Np,\frac{Np(1-p)}{n}) \implies \hat{p} = \frac{\bar{x}}{N}\) (Unbiased) (for a large sample size \(n\)) (Note: \(N\) is different from \(n\))
Poisson Distribution \(x \sim Poisson(\lambda)\)#
\(\bar{x} \sim \mathcal{N}(\lambda,\frac{\lambda}{n}) \implies \hat{\lambda} = \bar{x}\) (Unbiased, for a large sample size \(n\))
p-value of Hypothesis Testing ***#
Assuming Normal Distribution of \(x\)#
Testing on \(\mu\)
Known \(\sigma^2\) - “One Sample z-test” \(\implies z_{test} = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}\)
\(H_0\): \(\mu = \mu_0\); \(H_a\): \(\mu \neq \mu_0\) \(\implies\) Two-sided \(\implies\) p-value = \(2p(Z \geq |z_{test}|)\)
\(H_0\): \(\mu = \mu_0\); \(H_a\): \(\mu > \mu_0\) \(\implies\) One-sided (Upper Tail Test) \(\implies\) p-value = \(p(Z \geq z_{test})\)
\(H_0\): \(\mu = \mu_0\); \(H_a\): \(\mu < \mu_0\) \(\implies\) One-sided (Lower Tail Test) \(\implies\) p-value = \(p(Z \leq z_{test})\)
Unknown \(\sigma^2\) - “One Sample t-test” \(\implies t_{test} = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}\) (remember to use (n-1) degrees of freedom)
\(H_0\): \(\mu = \mu_0\); \(H_a\): \(\mu \neq \mu_0\) \(\implies\) Two-sided \(\implies\) p-value = \(2p(T \geq |t_{test}|)\)
\(H_0\): \(\mu = \mu_0\); \(H_a\): \(\mu > \mu_0\) \(\implies\) One-sided (Upper Tail Test) \(\implies\) p-value = \(p(T \geq t_{test})\)
\(H_0\): \(\mu = \mu_0\); \(H_a\): \(\mu < \mu_0\) \(\implies\) One-sided (Lower Tail Test) \(\implies\) p-value = \(p(T \leq t_{test})\)
Testing on \(\sigma^2\)
“Chi-squared Test” \(\implies \chi_{test}^2 = \frac{(n-1)s^2}{\sigma_0^2}\)
Two-sided \(\implies\) p-value \(= \min(p(\chi^2 > \chi_{test}^2), p(\chi^2 < \chi_{test}^2)) \)
Errors in Hypothesis Testing#
p-value \(\leq \alpha\) \(\implies\) Reject \(H_0\)
Type-I Error:(Definition) Reject \(H_0\) when it is True
\(\alpha\) = \(p\)(Type-I Error)
Typically, the \(\alpha\) values are provided as 5% or 10%
Confidence Intervals#
Useful z-score values#
Two-sided
\(90\% \implies z_{0.05} = \pm 1.645\)
\(95\% \implies z_{0.025} = \pm 1.96\)
\(99\% \implies z_{0.005} = \pm 2.575\)
One-sided Right Tail
\(90\% \implies z_{0.1}^{(r)} = 1.28\)
\(95\% \implies z_{0.05}^{(r)} = 1.645\)
\(99\% \implies z_{0.01}^{(r)} = 2.33\)
One-sided Left Tail
\(90\% \implies z_{0.1}^{(l)} = -1.28\)
\(95\% \implies z_{0.05}^{(l)} = -1.645\)
\(99\% \implies z_{0.01}^{(l)} = -2.33\)
Confidence Interval on Variance#
For given error rate (\(\alpha\))
\(\frac{(n-1)s^2}{\chi_{\frac{\alpha}{2}}^2(n-1)} \leq \sigma^2 \leq \frac{(n-1)s^2}{\chi_{1-\frac{\alpha}{2}}^2(n-1)}\)