The random variable X has the following probability mass function.

X -1 0 2 6 7
P(x) 0.3 0.1 0.3 0.2 0.1

Required:
a. Find the probability P( -1 < X ≤ 2) = ______
b. Find the cumulative distribution function F(x) and calculate F(3.2) = _____________
c. E(X) = ___________
d. Var(X) = __________
e. Suppose the number of errors in a piece of software has a Poisson distribution with parameter λ=3. The probability that there are 5 errors in a piece of software is ____.

Respuesta :

Given the PMF

[tex]P(X=x) = \begin{cases} 0.3 & \text{if } x \in \{-1, 2\} \\ 0.1 & \text{if } x \in \{0, 7\} \\ 0.2 & \text{if } x = 6 \\ 0 & \text{otherwise} \end{cases}[/tex]

(a)

[tex]P(-1 < X \le 2) = P(X = 0) + P(X = 2) = 0.1 + 0.3 = \boxed{0.4}[/tex]

(b) The CDF is defined as [tex]F_X(x) = P(X \le x)[/tex], so that

[tex]F_X(x) = \begin{cases} 0 & \text{if } x < -1 \\ 0.3 & \text{if } -1 \le x < 0 \\ 0.4 & \text{if } 0 \le x < 2 \\ 0.7 & \text{if } 2 \le x < 6 \\ 0.9 & \text{if } 6 \le x < 7 \\ 1 & \text{if } x \ge 7 \end{cases}[/tex]

It follows that

[tex]F(3.2) = \boxed{0.7}[/tex]

(c) Expectation is defined as

[tex]E[X] = \displaystyle \sum_x x\,P(X=x)[/tex]

We have

[tex]E[X] = \displaystyle \sum_{x\in\{-1,0,2,6,7\}} x\,P(X=x) \\\\ E[X] = -P(X=-1) + 2P(X=2)+6P(X=6)+7P(X=7) \\\\ E[X] = -0.3 + 0.6 + 1.2 + 0.7 = \boxed{2.2}[/tex]

(d) First compute the second moment of X, which is defined as

[tex]E[X^2] = \displaystyle \sum_x x^2\,P(X=x)[/tex]

We get

[tex]E[X^2] = (-1)^2P(X=-1) + 2^2P(X=2) + 6^2P(X=6) + 7^2P(X=7) \\\\ E[X^2] = 0.3 + 1.2 + 7.2 + 4.9 = 13.6[/tex]

Variance is defined as

[tex]\mathrm{Var}[X] = E[(X - E[X])^2] = E[X^2] - E[X]^2[/tex]

so it follows that

[tex]\mathrm{Var}[X] = 13.6 - 2.2^2 = \boxed{8.76}[/tex]

(e) Not sure what this part has to do with the rest of the question. At any rate, if Y is a random variable following a Poisson distribution with λ = 3, then Y has a PDF of

[tex]P(Y=y) = \begin{cases}\dfrac{e^{-3}\times3^y}{y!}&\text{if }y\in\{0,1,2,\ldots\}\\\\0&\text{otherwise}\end{cases}[/tex]

Then

[tex]P(Y > 5) = 1 - P(Y \le 5) = 1 - P(Y=0) - P(Y=1) - \cdots - P(Y=5) \\\\ P(Y>5) = \dfrac{5e^3-92}{5e^3} \approx \boxed{0.0839}[/tex]