# Thread: Desperate! Help! 3 Probability Questions

1. ## Desperate! Help! 3 Probability Questions

1. Let Y ~ Binomial(n,p) with pmf pY(y).Obtain the value of y for which pY(y) is maximum.

2. Let Y ~ geometric(p) with pmf pY(y).
(a) Show that the value p = 1/y maximizes the pmf.
(b) Obtain E(1/Y ).

3. Let X be a random variable, and Y = aX + b for non-random values a and b. Using the fact that MY(t) = (e^bt)MX(at) show that V ar(Y ) = (a^2)V ar(X).

Man...I'm so stressed. The textbook is useless and the prof won't answer questions till all 10 questions are handed in tomorrow. These are the last 3 questions I have.

2. Originally Posted by Ruichan
1. Let Y ~ Binomial(n,p) with pmf pY(y).Obtain the value of y for which pY(y) is maximum.
This is the mode of the binomial which is:

$\displaystyle \begin{array}{cc}\lfloor (n+1)p \rfloor,&\ \ \ (n+1)p \mbox{ not an integer}\\np \land (n+1)p,&\ \ \ (n+1)p \mbox{ an integer} \end{array}$

RonL

3. Thanks Captain but I don't understand?
I've looked through my old textbooks and the current textbook. There's no examples of maximization at all. My prof didn't even talk about it last semester nor this semester (began a week ago).

4. Originally Posted by Ruichan
Thanks Captain but I don't understand?
I've looked through my old textbooks and the current textbook. There's no examples of maximization at all. My prof didn't even talk about it last semester nor this semester (began a week ago).
I'm not surprised it appears to be maximisation with respect to a discrete
variable which is not something commonly covered in courses.

In this case we know that the pmf is approximatly symmetric and bell shaped
so we would expect its maximum to be near the mean, and with a bit of handwaving
that it is what I gave can be made plausible.

It makes me think that there may be a mistake in the way the problem has
been set.

(the next one is even worse, I can't quite figure out what it wants
maximised, it can't be to find the k that maximises the pmf for a fixed p
it must be to find the p that maximises the pmf for fixed k, which at least
is a problem that is susceptable to the use of calculus)

RonL

5. Originally Posted by Ruichan
2. Let Y ~ geometric(p) with pmf pY(y).
(a) Show that the value p = 1/y maximizes the pmf.
(b) Obtain E(1/Y ).
a) the pmf for the geometric distribution is:

$\displaystyle f(k,p)= \left\{\begin{array}{cc}(1-p)^{k-1}p,&\ \ \ k \in \{1,2,...\}\\0,&\ \ \ k \notin \{1,2,..\} \end{array}\right.$

so for any $\displaystyle k \in \{1,2,...\}$, we have:

$\displaystyle \frac{\partial f(k,p)}{\partial p}=(k-1)(1-p)^{k-2}(-1)p+(1-p)^{k-1}$

The maximum of $\displaystyle f(k,p)$ for fixed $\displaystyle k$ occurs when this is equal to zero, or with some rearrangement and cancelling factors of $\displaystyle (1-p)^{k-2}$ is equivalent to:

$\displaystyle -(k-1)p+(1-p)=0$,

which has solution $\displaystyle p=1/k$.

(There is a wrinkle that we should worry about briefly, and that is that the maximum could in principle occur when $\displaystyle p=1 \mbox{ or } 0$, but in this case these are minima for all $\displaystyle k>1$, so we need not worry about such posibbilities)

RonL

6. Originally Posted by Ruichan
.

2. Let Y ~ geometric(p) with pmf pY(y).
(a) Show that the value p = 1/y maximizes the pmf.
(b) Obtain E(1/Y ).
b)

$\displaystyle E(1/Y)=\sum_{k=1}^{\infty}\frac{(1-p)^{k-1}p}{k}=\frac{p}{1-p}\sum_{k=1}^{\infty}\frac{(1-p)^{k}}{k}$

The last is a standard series and sums to $\displaystyle -\ln(p)$ so:

$\displaystyle E(1/Y)=\frac{p}{p-1}\ln(p)$

RonL

(who would not be supprised to find an error in the above)

7. Originally Posted by CaptainBlack
b)

$\displaystyle E(1/Y)=\sum_{k=1}^{\infty}\frac{(1-p)^{k-1}p}{k}=\frac{p}{1-p}\sum_{k=1}^{\infty}\frac{(1-p)^{k}}{k}$

The last is a standard series and sums to $\displaystyle -\ln(p)$ so:

$\displaystyle E(1/Y)=\frac{p}{p-1}\ln(p)$

RonL

(who would not be supprised to find an error in the above)
I attempted question 2. I could get part a) but I didn't know how to get part b). Thank you very much!

8. Originally Posted by Ruichan
1. Let Y ~ Binomial(n,p) with pmf pY(y).Obtain the value of y for which pY(y) is maximum.

2. Let Y ~ geometric(p) with pmf pY(y).
(a) Show that the value p = 1/y maximizes the pmf.
(b) Obtain E(1/Y ).

3. Let X be a random variable, and Y = aX + b for non-random values a and b. Using the fact that MY(t) = (e^bt)MX(at) show that V ar(Y ) = (a^2)V ar(X).

Man...I'm so stressed. The textbook is useless and the prof won't answer questions till all 10 questions are handed in tomorrow. These are the last 3 questions I have.

for discrete case

if k is the mode

use
P(Y=k) >= P(Y= k+1)

and P(Y=k) >= P(Y=k-1)

substitute into the pmf and solve the inequalites for k

some steps are available at mode of the binomial distribution

some information on derivation of mean, variance ,mode , mgf of binomial distribution is available at derivation of mean, variance ,mode , mgf of binomial distribution

9. The only part i could do is part 2a).
1 and 3, I don't even know how to start.

Question 3: I know i have to get E(Y) and E(Y^2).
I just don't know what to do with MY(t) = (e^bt)MX(at).
How do I differentiate MY(t) = (e^bt)MX(at)?

10. Originally Posted by Ruichan
The only part i could do is part 2a).
1 and 3, I don't even know how to start.

Question 3: I know i have to get E(Y) and E(Y^2).
I just don't know what to do with MY(t) = (e^bt)MX(at).
How do I differentiate MY(t) = (e^bt)MX(at)?
did you go through the link on my previous post

a suggestion for question(3) is to expand

MX(t) = 1 +E(X) t/1! +E(X^2) (t^2) / 2! + ....

replace t with (at) to get MX(at)

then use product rule to differentiate MY(t) w.r.t. 't' and put t =0

hopefully you should get
E(Y) = a E(X) + b

diff. MY(t) w.r.t. 't' once more and put t =0 to get E(Y^2)

and use $\displaystyle Var(Y) = E(Y^2) - {E(Y) }^2$

11. Originally Posted by CaptainBlack
b)

$\displaystyle E(1/Y)=\sum_{k=1}^{\infty}\frac{(1-p)^{k-1}p}{k}=\frac{p}{1-p}\sum_{k=1}^{\infty}\frac{(1-p)^{k}}{k}$

The last is a standard series and sums to $\displaystyle -\ln(p)$ so:

$\displaystyle E(1/Y)=\frac{p}{p-1}\ln(p)$

RonL

(who would not be supprised to find an error in the above)
For the last part of this we need to obtain the following sum:

$\displaystyle S(p)=\sum_{k=1}^{\infty}\frac{(1-p)^{k}}{k}$

Consider:

$\displaystyle f(q)=\sum_{k=0}^{\infty}q^k=\frac{1}{1-q}$

Then consider the following integral:

$\displaystyle \int_0^q f(x) dx=\int_0^q \left[ \sum_{k=0}^{\infty} x^k \right] dx$

Integrating term by term on the left:

$\displaystyle \int_0^q f(x) dx= \sum_{k=0}^{\infty}\left[ \int_0^q x^k dx\right]$$\displaystyle = \sum_{k=0}^{\infty} \frac{q^{k+1}}{k+1}= \sum_{k=1}^{\infty} \frac{q^{k}}{k}$

But:

$\displaystyle \int_0^q f(x) dx=-\ln(1-q)$

So put $\displaystyle q=1-p$ and we have:

$\displaystyle S(p)=\sum_{k=1}^{\infty}\frac{(1-p)^{k}}{k}=-\ln(p)$

which is what we needed

RonL

12. Thank you very much Captain.

I did question 1 this way, not sure if it's correct or not:
P(Y=y) = pmf of binomial distribution (sorry dunno how to use the math function)
then i take log P(Y=y)
Next I differentiate log P(Y=y), then set it to 0.

Q3: I got confused at how should I differentiate (e^bt)Mx(at), the Mx(at) part.
I've figured out already and was able to prove that Var(Y)=a^2Var(X).

Thank you so much for your help again!
Till next week....the horror starts again!

13. Originally Posted by Ruichan
Thank you very much Captain.

I did question 1 this way, not sure if it's correct or not:
P(Y=y) = pmf of binomial distribution (sorry dunno how to use the math function)
then i take log P(Y=y)
Next I differentiate log P(Y=y), then set it to 0.