Week 12 Graded Assignment

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][a, b] with expectation ee and variance vv respectively. Find the value of abab.

Answer: ab=e23vab = e^2 - 3v

Solution: Given:

E[X]=b+a2=e    (b+a)2=4e2 E[X] = \frac{b+a}{2} = e \implies (b+a)^2 = 4e^2 Var(X)=(ba)212=v    (ba)2=12v \text{Var}(X) = \frac{(b-a)^2}{12} = v \implies (b-a)^2 = 12v (b+a)2(ba)2=4ab=4e212v    ab=e23v (b+a)^2 - (b-a)^2 = 4ab = 4e^2 - 12v \implies ab = e^2 - 3v

Example: If e=6e=6, v=4v=4:

ab=3612=24 ab = 36 - 12 = 24

2. Probability Density Function (Quadratic)

Question: The probability density function of a random variable XX is given by

f(x)={kx2if 0x10otherwise f(x) = \begin{cases} kx^2 & \text{if } 0 \leq x \leq 1 \\ 0 & \text{otherwise} \end{cases}

Find P(m<X<n)P(m < X < n). Options: a. n2m2n^2 - m^2 b. n3m39\frac{n^3 - m^3}{9} c. n2m29\frac{n^2 - m^2}{9} d. n3m3n^3 - m^3

Answer: d. n3m3n^3 - m^3

Solution:

01kx2dx=1    k=3 \int_0^1 kx^2 dx = 1 \implies k = 3 P(m<X<n)=mn3x2dx=n3m3 P(m < X < n) = \int_m^n 3x^2 dx = n^3 - m^3

Example: If m=0.1m=0.1, n=0.7n=0.7:

P=0.730.13=0.342 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 mm litres given that on that day, more than nn litres of milk was produced? (Answer correct to 2 decimal places)

Answer:

120m120n \frac{120 - m}{120 - n}

Solution:

P(X>mX>n)=1P(Xm)1P(Xn)=120m120n 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=115m=115, n=110n=110:

P=510=0.5 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 xx p.m. and yy p.m. What is the probability that the train reaches Delhi exactly at zz 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 tt minutes. If 5 persons arrived at the restaurant, what is the probability that at least 2 of them will be served in more than pp minutes? (Assume independence)

Options: a. 1(1ep/t)55ep/t(1ep/t)41 - (1 - e^{-p/t})^5 - 5e^{-p/t}(1 - e^{-p/t})^4 b. 1(ep/t)5[5(ep/t)4(1ep/t)]1 - (e^{-p/t})^5 - [5(e^{-p/t})^4(1 - e^{-p/t})] c. 1(1ept)5[5ept(1ept)4]1 - (1 - e^{-pt})^5 - [5e^{-pt}(1 - e^{-pt})^4] d. 1(ept)5[5e4pt(1ept)]1 - (e^{-pt})^5 - [5e^{-4pt}(1 - e^{-pt})]

Answer: a. 1(1ep/t)55ep/t(1ep/t)41 - (1 - e^{-p/t})^5 - 5e^{-p/t}(1 - e^{-p/t})^4

Solution:

P(X>p)=ep/t P(X > p) = e^{-p/t}

Probability at least 2 out of 5 take more than pp minutes:

P(at least 2)=1P(0)P(1) P(\text{at least 2}) = 1 - P(0) - P(1) P(0)=(1ep/t)5,P(1)=5ep/t(1ep/t)4 P(0) = (1 - e^{-p/t})^5, \quad P(1) = 5e^{-p/t}(1 - e^{-p/t})^4 P(at least 2)=1(1ep/t)55ep/t(1ep/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 XX is given by

f(x)={0.2xif 0x10.2if 1x20.2x0.2if 2x30.4if 3x40otherwise 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.50 < X < 2.5. (Answer up to three decimal points)

Answer: 0.425 (accepted range: [0.421, 0.429])

Solution:

P(0<X<2.5)=010.2xdx+120.2dx+22.5(0.2x0.2)dx=0.425 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 tt minutes. What will be the expected time (in minutes) for two visitors to arrive if one comes after the other? (Assume independence)

Options: a. 1t\frac{1}{t} b. 2t2t c. tt d. 2t\frac{2}{t}

Answer: b. 2t2t

Solution:

Mean=t,For two independent events: 2t \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][a, b] with variance 12 square minutes. The probability that a match will last at most mm minutes is 1p\frac{1}{p}. Find the expected time duration (in minutes) of a badminton match. (Answer correct to 1 decimal place)

Solution:

(ba)212=12    ba=12 \frac{(b-a)^2}{12} = 12 \implies b-a = 12 P(Xm)=maba=1p    ma=12p P(X \leq m) = \frac{m-a}{b-a} = \frac{1}{p} \implies m-a = \frac{12}{p} a=m12p,b=m12p+12 a = m - \frac{12}{p}, \quad b = m - \frac{12}{p} + 12 E[X]=a+b2=m12p+6 E[X] = \frac{a+b}{2} = m - \frac{12}{p} + 6

Example: If m=42m=42, p=6p=6:

a=40,b=52,E[X]=46 a = 40, \quad b = 52, \quad E[X] = 46

9. Exponential Distribution (Customer Care)

Question: The probability density function of the time XX (in minutes) between calls at the customer care is given by

f(x)={1mex/mif 0x<0otherwise 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. 11e1 - \frac{1}{e} b. 1e1 - e c. 1e\frac{1}{e} d. ee

Answer: c. 1e\frac{1}{e}

Solution:

P(Xm)=e1=1e 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 nn months. If there are pp% chances that a light bulb will last at most tt months, what is the value of tt?

Options: a. nln(100p100)n \ln\left(\frac{100-p}{100}\right) b. nln(100100p)n \ln\left(\frac{100}{100-p}\right) c. 1nln(100p100)\frac{1}{n} \ln\left(\frac{100-p}{100}\right) d. 1nln(100100p)\frac{1}{n} \ln\left(\frac{100}{100-p}\right)

Answer: b. nln(100100p)n \ln\left(\frac{100}{100-p}\right)

Solution:

P(Xt)=p100    1et/n=p100 P(X \leq t) = \frac{p}{100} \implies 1 - e^{-t/n} = \frac{p}{100} et/n=100p100    t=nln(100100p) e^{-t/n} = \frac{100-p}{100} \implies t = n \ln\left(\frac{100}{100-p}\right)

Example: If n=18n=18, p=60p=60:

t=18ln(2.5) t = 18 \ln(2.5)

This covers all questions and solutions from the PDF12.