set.seed(113023)
plot.ecdf(rpois(10, 1), main = 'CDF', ylab = 'F(x)')
Midterm 2
Instructions: read each problem carefully and provide solutions in the space below the prompt or on the reverse side of the page. You should provide as much justification and detail in calculation as needed to clearly display your thought process, but need not show or justify every step. If you use results from class in your solution, you can simply write, ``by a theorem/problem/example from class“. None of the problems require you to perform numerical calculations.If you are unable to obtain a complete solution, a solution sketch may receive partial credit if it reflects a clear understanding of the problem and a well-reasoned approach. Please feel free to ask any clarifying questions about the problems as they arise. Good luck!
- Let \(X\) have the distribution characterized by the CDF below. Determine whether \(X\) is discrete or continuous, and then write the PMF/PDF and compute its expectation \(\mathbb{E}X\).
Let \(X\) have MGF \(m_X(t) = \frac{1}{1 - t^2}, -1<t<1\), and define \(Y = \mu X + \sigma\), where \(\mu \in \mathbb{R}\) and \(\sigma > 0\). Find the MGF of \(Y\), and use it to determine its mean \(\mathbb{E}Y\) and variance \(\text{var}Y\).
Let \(Y\) be distributed according to the CDF: \[F_k(y) = \begin{cases} 0 &, y \leq 0 \\ \frac{1}{2}y^{\frac{1}{k}} &, 0 < y < 2^k \\ 1 &, y \geq 2^k \end{cases}\] Find the PDF of \(Y\) (be sure to indicate the support set) and use it to calculate the mean and variance.
Name | PDF/PMF | Support | Parameters | Mean | Variance | MGF |
---|---|---|---|---|---|---|
Discrete uniform | \(\frac{1}{n}\) | \(\{a_1, \dots, a_n\}\) | none | \(\bar{a}\) | \(\frac{1}{n}\sum_{i = 1}^n (a_i - \bar{a})^2\) | \(\frac{1}{n}\sum_{i = 1}^n e^{ta_i}\) |
Bernoulli | \(p^x (1 - p)^{1 - x}\) | \(\{0, 1\}\) | \(p \in (0, 1)\) | \(p\) | \(p(1 - p)\) | \(1 - p + pe^t\) |
Geometric | \((1 - p)^x p\) | \(\mathbb{N}\) | \(p \in (0, 1)\) | \(\frac{1 - p}{p}\) | \(\frac{1 - p}{p^2}\) | \(\frac{p}{1 - (1 - p)e^t}\) \(t < -\log(1 - p)\) |
Binomial | \({n \choose p} p^x (1 - p)^{n - x}\) | \(\{0, 1, \dots, n\}\) | \(n \in \mathbb{Z}^+\) \(p \in (0, 1)\) |
\(np\) | \(np(1 - p)\) | \(\left(1 - p + pe^t\right)^n\) |
Negative binomial | \({r + x - 1 \choose x} p^r (1 - p)^x\) | \(\mathbb{N}\) | \(r \in \mathbb{Z}^+\) \(p \in (0, 1)\) |
\(\frac{r(1 - p)}{p}\) | \(\frac{r(1 - p)}{p^2}\) | \(\left(\frac{p}{1 - (1 - p)e^t}\right)^r\) \(t < -\log(1 - p)\) |
Poisson | \(\frac{\lambda^xe^{-\lambda}}{x!}\) | \(\mathbb{N}\) | \(\lambda > 0\) | \(\lambda\) | \(\lambda\) | \(\exp\left\{-\lambda(1 - e^t)\right\}\) |
Continuous uniform | \(\frac{1}{b - a}\) | \((a, b)\) | \(-\infty < a < b < \infty\) | \(\frac{b + a}{2}\) | \(\frac{(b - a)^2}{12}\) | \(\begin{cases}\frac{e^{ta} - e^{tb}}{t(b - a)} &,\;t\neq 0 \\ 1 &,\; t = 0 \end{cases}\) |
Gaussian | \(\frac{1}{\sqrt{2\pi\sigma^2}} e^{-\frac{1}{2\sigma^2} (x - \mu)^2}\) | \(\mathbb{R}\) | \(\mu \in \mathbb{R}, \sigma > 0\) | \(\mu\) | \(\sigma^2\) | \(\exp\left\{\mu t + \frac{1}{2}t^2\sigma^2\right\}\) |
Gamma | \(\frac{1}{\Gamma(\alpha)\beta^\alpha} x^{\alpha - 1} e^{-\frac{x}{\beta}}\) | \(x > 0\) | \(\alpha > 0, \beta > 0\) | \(\alpha\beta\) | \(\alpha\beta^2\) | \(\left(1 - \beta t\right)^{-\alpha}\) |