owned this note
owned this note
Published
Linked with GitHub
# Prob-Stats 1 Assignment
The answers of the following questions can easily be found online, that being said, I expect you to use your own intuition and thinking to solve these questions.That being said feel free to take help from any general resources available online or shared by us for solving these questions.
Lets begin from the basics
1a. Poisson distribution is an approximation of the binomial distribution where $n \rightarrow \infty$ and $p \rightarrow 0$ but their product is finite. Find out the required approximations in the calculation and thus find the PDF of poisson distribution from the Binomial PDF $P(X=x)=\ ^nC_x\ p^x\ (1-p)^{n-x}$.Take $np=\lambda$.
Hint: note that $lim_{n \rightarrow \infty}(1+\frac{1}{n})^n=e$.
Now that you have the PMF of a poisson distribution with parameter $\lambda$, you can now use python to graph the distribution for different values of x.
1b. For the given values of $n$ and $p$, calculate $\lambda$, and graph the binomial and poisson distribution and note the accuracy of poisson distribution. Figure out an appropriate metric for accuracy.
i. $n=20,\ p=0.23$
ii. $n=3\cdot 10^5,\ p=10^{-6}$
Make sure to give any insights that you have from the graphs.
If you are facing any difficulty in the graphing and calculating part, feel free to contact me.
2. Consider two N(0,1) random variables X and Y. Now,
$W=XY+X^2Y+XY^2$
$Z=XY^3+X^3Y$
Find $Cov(W,Z)$
3. We have WLLN: $lim_{n\rightarrow \infty}P(|\bar{X}-\mu |\ge \epsilon)=0$. Can you prove this statement using Chebyshev's inequaliy $P(|\bar{X}-\mu|\ge k\sigma)\le \frac 1 {k^2}$.
4. Now, lets move on to Central Limit Theorem. CLT applies to any distribution such that its random variables are i.i.d and and its variance is finite. So, now you have to apply CLT on the following distribution.
Take your enrollment number, Divide each digit by the sum of all digits. $i^{th}$ digit now corresponds to the probability of $X=i$. So for example, the number $12345678$ corresponds to the distribution:
|x |1 |2 |3 |4 |5 |6 |7 |8 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|P(X=x) |$\frac{1}{36}$ |$\frac{1}{18}$ |$\frac{1}{12}$ |$\frac{1}{9}$ |$\frac{5}{36}$ |$\frac{1}{6}$ |$\frac{7}{36}$ |$\frac{2}{9}$ |
After you have made this distribution, begin to sample from this distribution. Take 10000 samples and then take their mean. Repeat this process 10000 times and graph the frequency histogram in python (use sns histplot).
What is the resulatant graph? Does it depend on the original distribution?
Calculate the $\mu$ and $\sigma$ of the original distribution and the resulting distribution using CLT by hand. Does it match the $\mu$ and $\sigma$ of your experimental graph?
5. Consider the following Joint PDF
$p(x,y)=$ $$
\begin{cases}
1 &\text{if } 0\le x<\infty, 0\le y\le e^{-x} \\
0 &\text{otherwise}
\end{cases}
$$
Are X and Y independent? If yes, prove the same. Otherwise calculate the conditional Probability $p(y|x)$. Can you justify the previous results intuitively?
6. Consider a binomial distribution with some p. After generating 100 samples from this distribution with n=10, we get $\bar{X}_n$=4.97. Can we reject the null hypothesis that p=0.5 using this information? Why don't we take the null hypothesis as p=0.497 as it gives the highest $P(\bar{x})$ value?
7. If $(X,Y)$ has the bivariate normal probability distribution function,
$$f(X,Y) = \frac{1}{2\pi(1-\rho^2)^{1/2}} exp\left(\frac{-1}{2(1-\rho^2)} (x^2 - 2\rho xy + y^2) \right)$$
show that $Corr(X,Y) = \rho$ and $Corr(X^2,Y^2) = \rho^2$.