135,634 views
10 votes
10 votes
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 ____.

User Travis Swientek
by
2.8k points

1 Answer

6 votes
6 votes

Given the PMF


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

(a)


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

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


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

It follows that


F(3.2) = \boxed{0.7}

(c) Expectation is defined as


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

We have


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}

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


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

We get


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

Variance is defined as


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

so it follows that


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

(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


P(Y=y) = \begin{cases}(e^(-3)*3^y)/(y!)&amp;\text{if }y\in\{0,1,2,\ldots\}\\\\0&amp;\text{otherwise}\end{cases}

Then


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

User Gburnett
by
3.0k points