My office hours are on 16:30 - 18:00 Tuesday and **13:30 - 15:00 Friday*. You may check the campus map to get to my office.
To recap, for discrete random variable \(X\), the expectation, variance and standard deviation are given by:
\[\begin{equation} \boxed{E(X) = \mu_x = \sum_x x \cdot P(X=x)} \end{equation}\] \[\begin{equation} \boxed{Var(X) = \sigma^2_x = \sum_x (x-\mu_x)^2 \cdot P(X=x) = E(X^2)-[E(X)]^2 = \sum_x x^2 \cdot P(X=x) - \Big(\sum_x x \cdot P(X=x)\Big)^2} \end{equation}\] \[\begin{equation} \boxed{SD(X) = \sqrt{Var(X)} = \sigma_x} \end{equation}\]To recap, for continuous random variable \(X\), the expectation, variance and standard deviation are given by:
\[\begin{equation} \boxed{E(X) = \mu_x = \int_{-\infty}^{\infty} x \cdot f(x)dx} \end{equation}\] \[\begin{equation} \boxed{Var(X) = \sigma^2_x = \int_{-\infty}^{\infty} (x-\mu_x)^2 \cdot f(x)dx = E(X^2)-[E(X)]^2 = \int_{-\infty}^{\infty} x^2 \cdot f(x) dx - \Big(\int_{-\infty}^{\infty} x \cdot f(x)dx\Big)^2} \end{equation}\] \[\begin{equation} \boxed{SD(X) = \sqrt{Var(X)} = \sigma_x} \end{equation}\]The expectation for continuous distribution could be derived by integrating the products of \(x\) and the probability density function \(f(x)\) over the domain. In most of the cases, the domain should be \(-\infty < x < \infty\), \(0 < x < \infty\) or \(a \le x \le b\). Reminder: don’t try to round the expectation to integer.
After obtaining the expectation, there are two major ways to compute the variance: (1) to integrate over the products of \([x-E(X)]^2\) and the probability density function \(f(x)\) over the domain or (2) integrate over the products of \(x^2\) times the probability density function \(f(x)\) and subtract the result by the square of the expectation.
Finally, to obtain the standard deviation, we can take the positive square root of variance. Reminder: standard deviation must be positive.
If the notation \(f(x)\) appears on test questions, it means that \(X\) is a continuous random variable. On the other hand, if the notation \(p(x)\) appears on test questions, it means that \(X\) is a discrete random variable.
Sometimes it is more convenient to calculate the complement than computing and adding up every part of the probability. This is particularly evident when you encounter the key words like “at least one” and “not all”.
Method of moment is one of the statistics inference method to give an estimate for continuous random variable \(X\). Now we know \(E(X) = \mu\), we define the n-th central moment of a continuous random variable as:
\[\begin{equation} \boxed{\mu_n = E\Big[(X-E(X))^n\Big] = \int_{-\infty}^{\infty} (x-\mu)^n \cdot f(x)dx} \end{equation}\]Let us derive the \(0^{th}\), first and second central moments:
\(\bullet\) Zero: \(\mu_0 = E\Big[(X-E(X))^0\Big] = \int_{-\infty}^{\infty} 1 \cdot f(x)dx = 1\), obvious?
\(\bullet\) First: \(\mu_1 = E\Big[(X-E(X))^1\Big] = E\Big[X-E(X)\Big] = E(X)-E(X) = 0\), great?
\(\bullet\) Second: \(\mu_2 = E\Big[(X-E(X))^2\Big] = \int_{-\infty}^{\infty} (x-\mu)^2 \cdot f(x)dx = Var(X)\). This tells that variance is the second central moment of a continuous random variable \(X\).
Gamma distribution is crucial in probability theories since it can model disease, predict weather, and model waiting time in queue model. Gamma distribution takes a random variable \(X\) and two parameters \(\alpha\) (shape parameter) and \(\beta\) (scale parameter).
The density of gamma(\(\alpha,\beta\)) distribution is given by:
\[\begin{equation} \boxed{f(x;\alpha,\beta)=\frac{x^{\alpha-1}e^{-\frac{x}{\beta}}}{\beta^{\alpha}\Gamma(\alpha)},~\alpha>0,~\beta>0,~0<x<\infty} \end{equation}\]Then, its expectation and variance are derived by:
\[\begin{equation} \boxed{E(X)=\int_0^{\infty}x\frac{x^{\alpha-1}e^{-\frac{x}{\beta}}}{\beta^{\alpha}\Gamma(\alpha)}dx=\int_0^{\infty}\frac{x^{(\alpha+1)-1}e^{-\frac{x}{\beta}}}{\beta^{\alpha}\Gamma(\alpha)}dx=\frac{\Gamma(\alpha+1)}{\beta^{\alpha}\Gamma(\alpha)(\frac{1}{\beta})^{\alpha+1}}=\alpha\cdot\beta} \end{equation}\] \[\begin{equation} \boxed{E(X^2)=\int_0^{\infty}x^2\frac{x^{\alpha-1}e^{-\frac{x}{\beta}}}{\beta^{\alpha}\Gamma(\alpha)}dx=\int_0^{\infty}\frac{x^{(\alpha+2)-1}e^{-\frac{x}{\beta}}}{\beta^{\alpha}\Gamma(\alpha)}dx=\frac{\Gamma(\alpha+2)}{\beta^{\alpha}\Gamma(\alpha)(\frac{1}{\beta})^{\alpha+2}}=(\alpha+1)\alpha\cdot\beta^2} \end{equation}\]Therefore, the variance of such gamma distribution is
\[\begin{equation} \boxed{V(X)=E(X^2)-[E(X)]^2=(\alpha+1)\alpha\cdot\beta^2-\alpha^2\cdot\beta^2=\alpha\cdot\beta^2} \end{equation}\]To recap, the expectation of Gamma distribution is the product of the shape and scale parameter, while the variance of Gamma distribution is the product of the shape parameter and the square of the scale parameter.
Could any of you try to derive the expected amount of snow on a day that it snows by using the Gamma distribution? This may serve as a more convenient way to compute than doing the integration by part!
Given \(f(x) = 9x e^{-3x}\), we can refer to the probability density function of Gamma distribution and obtain \(\alpha = 2\), \(\beta = \frac{1}{3}\) (Check!). Therefore, the expected amount of snow on a day that it snows is
\[\begin{equation} \boxed{E(X)=\alpha\cdot\beta = \frac{2}{3}} \end{equation}\]Okay, now we can even derive the variance and standard deviation. Simply applying the variance formula for Gamma distribution we obtain:
\[\begin{equation} \boxed{V(X)=\alpha\cdot\beta^2 = \frac{2}{3^2} = \frac{2}{9}} \end{equation}\] \[\begin{equation} \boxed{SD(X)=\sqrt{V(X)} = \sqrt{\frac{2}{3^2}} = \frac{\sqrt{2}}{3}} \end{equation}\]\(\bullet\) The notion that we repeat the same trial or experiment until obtaining the first success/failure/(something) indicates that the random variable X follows geometric distribution. It is a discrete probability distribution with probability mass function:
\[\begin{equation} \boxed{P(X = k) = (1-p)^{k-1} \cdot p, k = 1,2,3,......} \end{equation}\]\(\bullet\) We can extend that notion to repeat the same trial or experiment until the r success/failure occurs. In this case, the random variable X follows negative binomial distribution. It is also a discrete probability distribution, with probability mass function:
\[\begin{equation} \boxed{P(X = n) = {{n-1}\choose{r-1}}(1-p)^{n-r}p^{r-1} \cdot p = {{n-1}\choose{r-1}}(1-p)^{n-r}p^{r}, n = r, r+1, r+2,......} \end{equation}\]You are told in class that:
\[\begin{equation} \boxed{V(aX+b)= a^2 \cdot Var(X)} \end{equation}\] \[\begin{equation} \boxed{SD(aX + b)= |a|\cdot SD(X)} \end{equation}\]Suppose that salaries at a company have mean $50,000 and standard deviation $10,000. Could you derive the variance and standard deviation from above formulas if a) everyone at the company is given a $500 raise? b) everyone at the company is given a 5% raise?
\(\bullet\) To derive the standard deviation for the summation of independent random variables, say \(X_1 + X_2 + ...... + X_n\), please compute the variance first by formula \(Var(X_1 + X_2 + ...... + X_n) = Var(X_1) + ...... + Var(X_n)\). Then, you can take the square root to obtain the standard deviation. Do not directly add the standard deviations.
Please inform me to fix the typos and grammatical mistakes if they exist. It is a great practice of writing and I appreciate your help!