# *Prob Stats-1 : Assignment*
1. Let $Y = |Z|$, where $Z \sim N(0,1)$ i.e it has parameters $\mu = 0$ and $\sigma^2 = 1$. Derive the probability distribution of $Y$, expectation $\mathbb{E}[Y]$ and variance $\text{Var}(Y)$. Try to compute different moments of Y as well i.e $\mathbb{E}[Y^2]$, $\mathbb{E}[Y^3]$.
2. (a) Utilize the **Law of the Unconscious Statistician (LOTUS)** to establish the **Stein-Chen identity** for a Poisson-distributed random variable. Specifically, show that if $X \sim \text{Pois}(\lambda)$ and $g$ is any function for which the expectations exist, then
$$\mathbb{E}[X g(X)] = \lambda \mathbb{E}[g(X+1)]$$
(b) Apply the identity derived in part (a) to compute the third moment $\mathbb{E}[X^3]$ for $X \sim \text{Pois}(\lambda)$. Use algebraic simplifications along with the known facts that $\mathbb{E}[X] = \lambda$ and $\text{Var}(X) = \lambda$ to simplify the computation.
3. Imagine two first-year **Data Science Group (DSG)** students, each trying their best to stay focused during a long lecture. Their attention spans—measured as the time before they lose focus—are modeled as independent **Exponential** random variables:
- $T_1 \sim \text{Expo}(\lambda_1)$ for Student 1
- $T_2 \sim \text{Expo}(\lambda_2)$ for Student 2
Given this, what’s the probability that **Student 1 zones out before Student 2**, i.e.,
$$P(T_1 < T_2)?$$
**Hint:** The time until the first student loses focus, $\min(T_1, T_2)$, follows an **Exponential** distribution with rate $\lambda_1 + \lambda_2$. Use this fact to derive the probability.
4. Devansh wants to send a simple yes-or-no answer to Shree through a noisy communication channel. He represents **"yes"** as **1** and **"no"** as **0** before transmitting the message. However, the channel introduces some random noise, modeled as a normal distribution **N(0, σ²)**, meaning the message gets slightly altered in an unpredictable way before reaching Shree.
To decode the message, Shree follows a simple rule:
- If the received value is **greater than 1/2**, he interprets it as **"yes"**.
- Otherwise, he assumes it means **"no"**.
### Solve:
(a) What is the probability that Shree correctly understands Devansh's message?
(b) How does this probability change when **σ** (the noise level) is **very small** or **very large**? Why does this make sense intuitively?
In simple terms, the goal is to understand how likely it is for Shree to correctly interpret Devansh’s message and how noise affects this probability.
5. Imagine you’re a **data detective** exploring four mysterious worlds—one ruled by sudden bursts of energy (*Exponential*), another where events happen at steady intervals (*Poisson*), a third governed by binary choices (*Binomial*), and the last, a bizarre mix of structured Normality and unpredictable Uniform chaos.
Your mission? **Prove that no matter how skewed or chaotic these worlds appear, the Central Limit Theorem (CLT) will bring order to the randomness.**
To do this, you will:
a. **Spy on each world** by collecting **80 raw observations**, capturing their unfiltered nature.
b. **Sneakily sample their means**—drawing **1,000 samples** of size **80** and again of size **30**:
$$
\bar{X} = \frac{1}{n} \sum_{i=1}^{n} X_i
$$
c. **Check if the law holds**—Do the sampling distributions approach the elegant **bell curve** of a Normal distribution? Do their means and standard deviations align with:
$$
\mu_{\bar{X}} = \mu, \quad \sigma_{\bar{X}} = \frac{\sigma}{\sqrt{n}}
$$
*Cool! Now that you had Proved the CLT Calculate Z-Statistic for the problem below in python:*
A company claims their light bulbs last 800 hours. A sample of 50 bulbs has a mean lifetime of 780 hours with a standard deviation of 50 hours. Test at the 5% significance level if the mean lifetime differs from the claim.