Penny flipped and uniform PDF generated

  • Thread starter Thread starter alpines4
  • Start date Start date
  • Tags Tags
    Pdf Uniform
alpines4
Messages
4
Reaction score
0

Homework Statement


A penny is flipped until we see the first head, and flips are assumed to be independent. For each tail we observe before the first head, the value of a continuous random variable with uniform PDF over the interval [0,3] is generated. Let the RV X be the sum of all the values obtained before the first head. We want to find the mean and variance of X.

Homework Equations


The Attempt at a Solution



Assuming n tails before the first head, we have E[X] = E[X_1 + ... + X_n] = E[X_1] + ... + E[X_n], and Var(X) = Var(X_1 + ... + X_n) = Var(X_1) + ... + Var(X_n) as the X_i are independent so there are no covariance terms.

Since each X_i has a discrete uniform distribution, the pdf of each X_i is 1/4 for X_i = 0,1,2, or 3.

Also, the probability of flipping n tails before the first head is (0.5)^n.

However, I'm not sure how to put all of this together. I think the mean of X will be (1/4) + ...+ (1/4) n times, but this doesn't take into account the probability of flipping n tails. Any help would be appreciated.
 
Physics news on Phys.org
alpines4 said:

Homework Statement


A penny is flipped until we see the first head, and flips are assumed to be independent. For each tail we observe before the first head, the value of a continuous random variable with uniform PDF over the interval [0,3] is generated. Let the RV X be the sum of all the values obtained before the first head. We want to find the mean and variance of X.



Homework Equations





The Attempt at a Solution



Assuming n tails before the first head, we have E[X] = E[X_1 + ... + X_n] = E[X_1] + ... + E[X_n], and Var(X) = Var(X_1 + ... + X_n) = Var(X_1) + ... + Var(X_n) as the X_i are independent so there are no covariance terms.

Since each X_i has a discrete uniform distribution, the pdf of each X_i is 1/4 for X_i = 0,1,2, or 3.

Also, the probability of flipping n tails before the first head is (0.5)^n.

However, I'm not sure how to put all of this together. I think the mean of X will be (1/4) + ...+ (1/4) n times, but this doesn't take into account the probability of flipping n tails. Any help would be appreciated.


You have one expression wrong: the probability of flipping n tails before the first head is 1/2 for n = 0 (i.e., the first toss is heads) and is (1/2)^n for n >= 1. Since it is possible that there are no tails before the first head, your generation scheme also needs to handle that case. I can see two "reasonable" ways: (i) ignore that case and do another sequence of flips; or (ii) when there are no tails, generate the single value "0".

In case (ii) the generated random variables would be mixed discrete and continuous, with a finite probability of the point 0. In case (i) the number of tails distribution would be P{Tails=n}= (1/2)^(n-1), n=1,2,... (the conditional probability of having first toss = tails).
So, case (i) is easier to work with and I will do that. You have EX =\sum_{n=1}^{\infty} P\{\text{Tails}=n\} E(X_1 + \cdots + X_n),
and similarly for Var(X).

RGV
 
Thank you for your help, Ray.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top