Week 12 Graded Assignment
Statistics Graded Assignment
Here are all the questions and their solutions from the Week_12_Graded_Solution.pdf (Statistics for Data Science-1, Week 12 Graded Assignment, Continuous random variables)12:
1. Uniformly Distributed Random Variable
Question: Let a random variable be uniformly distributed over $[a, b]$ with expectation $e$ and variance $v$ respectively. Find the value of $ab$.
Answer: $ab = e^2 - 3v$
Solution: Given:
$$ E[X] = \frac{b+a}{2} = e \implies (b+a)^2 = 4e^2 $$$$ \text{Var}(X) = \frac{(b-a)^2}{12} = v \implies (b-a)^2 = 12v $$$$ (b+a)^2 - (b-a)^2 = 4ab = 4e^2 - 12v \implies ab = e^2 - 3v $$Example: If $e=6$, $v=4$:
$$ ab = 36 - 12 = 24 $$2. Probability Density Function (Quadratic)
Question: The probability density function of a random variable $X$ is given by
$$ f(x) = \begin{cases} kx^2 & \text{if } 0 \leq x \leq 1 \\ 0 & \text{otherwise} \end{cases} $$Find $P(m < X < n)$. Options: a. $n^2 - m^2$ b. $\frac{n^3 - m^3}{9}$ c. $\frac{n^2 - m^2}{9}$ d. $n^3 - m^3$
Answer: d. $n^3 - m^3$
Solution:
$$ \int_0^1 kx^2 dx = 1 \implies k = 3 $$$$ P(m < X < n) = \int_m^n 3x^2 dx = n^3 - m^3 $$Example: If $m=0.1$, $n=0.7$:
$$ P = 0.7^3 - 0.1^3 = 0.342 $$3. Uniform Distribution (Milk Production)
Question: The amount of milk produced every day by a dairy is uniformly distributed between 100 litres and 120 litres. What is the probability that the amount of milk produced is more than $m$ litres given that on that day, more than $n$ litres of milk was produced? (Answer correct to 2 decimal places)
Answer:
$$ \frac{120 - m}{120 - n} $$Solution:
$$ P(X > m \mid X > n) = \frac{1 - P(X \leq m)}{1 - P(X \leq n)} = \frac{120 - m}{120 - n} $$Example: If $m=115$, $n=110$:
$$ P = \frac{5}{10} = 0.5 $$4. Uniform Distribution (Train Arrival)
Question: The time that Jan Shatabdi express will reach the Delhi station is uniformly distributed between $x$ p.m. and $y$ p.m. What is the probability that the train reaches Delhi exactly at $z$ p.m.?
Answer: 0
Solution: For a continuous uniform distribution, the probability at any exact point is zero.
5. Exponential Distribution (Restaurant Service)
Question: The length of time for one person to be served at a restaurant is exponentially distributed, with an expected time of $t$ minutes. If 5 persons arrived at the restaurant, what is the probability that at least 2 of them will be served in more than $p$ minutes? (Assume independence)
Options: a. $1 - (1 - e^{-p/t})^5 - 5e^{-p/t}(1 - e^{-p/t})^4$ b. $1 - (e^{-p/t})^5 - [5(e^{-p/t})^4(1 - e^{-p/t})]$ c. $1 - (1 - e^{-pt})^5 - [5e^{-pt}(1 - e^{-pt})^4]$ d. $1 - (e^{-pt})^5 - [5e^{-4pt}(1 - e^{-pt})]$
Answer: a. $1 - (1 - e^{-p/t})^5 - 5e^{-p/t}(1 - e^{-p/t})^4$
Solution:
$$ P(X > p) = e^{-p/t} $$Probability at least 2 out of 5 take more than $p$ minutes:
$$ P(\text{at least 2}) = 1 - P(0) - P(1) $$$$ P(0) = (1 - e^{-p/t})^5, \quad P(1) = 5e^{-p/t}(1 - e^{-p/t})^4 $$$$ P(\text{at least 2}) = 1 - (1 - e^{-p/t})^5 - 5e^{-p/t}(1 - e^{-p/t})^4 $$6. Piecewise PDF
Question: Probability density function of a random variable $X$ is given by
$$ f(x) = \begin{cases} 0.2x & \text{if } 0 \leq x \leq 1 \\ 0.2 & \text{if } 1 \leq x \leq 2 \\ 0.2x - 0.2 & \text{if } 2 \leq x \leq 3 \\ 0.4 & \text{if } 3 \leq x \leq 4 \\ 0 & \text{otherwise} \end{cases} $$Find the probability that $0 < X < 2.5$. (Answer up to three decimal points)
Answer: 0.425 (accepted range: [0.421, 0.429])
Solution:
$$ P(0 < X < 2.5) = \int_0^1 0.2x\,dx + \int_1^2 0.2\,dx + \int_2^{2.5} (0.2x - 0.2)\,dx = 0.425 $$7. Exponential Distribution (Visitor Arrival)
Question: In a certain exhibition, the time for the next visitor to come is exponentially distributed with a standard deviation of $t$ minutes. What will be the expected time (in minutes) for two visitors to arrive if one comes after the other? (Assume independence)
Options: a. $\frac{1}{t}$ b. $2t$ c. $t$ d. $\frac{2}{t}$
Answer: b. $2t$
Solution:
$$ \text{Mean} = t, \quad \text{For two independent events: } 2t $$8. Uniform Distribution (Badminton Match)
Question: The total duration (in minutes) of a badminton match in the Premier Badminton League (PBL) is uniformly distributed between $[a, b]$ with variance 12 square minutes. The probability that a match will last at most $m$ minutes is $\frac{1}{p}$. Find the expected time duration (in minutes) of a badminton match. (Answer correct to 1 decimal place)
Solution:
$$ \frac{(b-a)^2}{12} = 12 \implies b-a = 12 $$$$ P(X \leq m) = \frac{m-a}{b-a} = \frac{1}{p} \implies m-a = \frac{12}{p} $$$$ a = m - \frac{12}{p}, \quad b = m - \frac{12}{p} + 12 $$$$ E[X] = \frac{a+b}{2} = m - \frac{12}{p} + 6 $$Example: If $m=42$, $p=6$:
$$ a = 40, \quad b = 52, \quad E[X] = 46 $$9. Exponential Distribution (Customer Care)
Question: The probability density function of the time $X$ (in minutes) between calls at the customer care is given by
$$ f(x) = \begin{cases} \frac{1}{m} e^{-x/m} & \text{if } 0 \leq x < \infty \\ 0 & \text{otherwise} \end{cases} $$Find the probability that time between calls exceeds the mean time.
Options: a. $1 - \frac{1}{e}$ b. $1 - e$ c. $\frac{1}{e}$ d. $e$
Answer: c. $\frac{1}{e}$
Solution:
$$ P(X \geq m) = e^{-1} = \frac{1}{e} $$10. Exponential Distribution (Light Bulb Lifetime)
Question: The lifetime of a light bulb is exponentially distributed with a mean life of $n$ months. If there are $p%$ chances that a light bulb will last at most $t$ months, what is the value of $t$?
Options: a. $n \ln\left(\frac{100-p}{100}\right)$ b. $n \ln\left(\frac{100}{100-p}\right)$ c. $\frac{1}{n} \ln\left(\frac{100-p}{100}\right)$ d. $\frac{1}{n} \ln\left(\frac{100}{100-p}\right)$
Answer: b. $n \ln\left(\frac{100}{100-p}\right)$
Solution:
$$ P(X \leq t) = \frac{p}{100} \implies 1 - e^{-t/n} = \frac{p}{100} $$$$ e^{-t/n} = \frac{100-p}{100} \implies t = n \ln\left(\frac{100}{100-p}\right) $$Example: If $n=18$, $p=60$:
$$ t = 18 \ln(2.5) $$This covers all questions and solutions from the PDF12.