MHB Estimating variance of Poisson random variable

AI Thread Summary
The discussion focuses on estimating the mean and variance of a Poisson random variable with a mean of 5 using R. A random sample is generated, and the expected value of the square root of the sample is calculated, yielding a value close to the theoretical square root of 5. The variance of the square root is estimated using a specific formula, resulting in a value of approximately 0.2230577, which raises questions about its accuracy. It is clarified that the variance cannot be zero, as this would imply a constant random variable. The speaker concludes that calculating the expected value of the square root requires a more complex approach, suggesting that the variance should be around 1/4.
Jameson
Insights Author
Gold Member
MHB
Messages
4,533
Reaction score
13
I am trying to use a generated random sample in R to estimate the mean and variance for a Poisson random variable. The first one is a Poisson random variable with mean 5.

To estimate the above I generate a random sample in R with the following code:
Code:
P5 <- rpois(100,5)

Given the above I want to find $E[\sqrt{X}]$. Easy enough. To estimate the expected value of the square of X, I can take the square root of the sample and divide by 100.
Code:
mean(sqrt(P5))

The above comes out to be 2.292802 and $\sqrt{5}=2.2346$ so all looks good.

Now I want to estimate the $\text{Var}[\sqrt{X}]$. I can use the following formula to help: $\text{Var}[\sqrt{X}]=E[X]-E[\sqrt{X}]^2$
Code:
sum((P5))/100-(sum(sqrt(P5))/100)^2

From the above I get 0.2230577 but to honest, I can't figure out what the ideal value should be. Plugging in $\lambda$ into the variance formula is seems like this should be $\lambda-\sqrt{\lambda}^2=0$.

Any insight as to how to get this value?
 
Physics news on Phys.org
Ok so after thinking about this for more than 1 second a couple of things are clearer:

1) The variance is obviously not 0. I knew that before but it seems so hilariously absurd now as that would mean the value of the random variable is always a constant.

2) To calculate $E[\sqrt{X}]$ I need to use the full formula and not just "plug in". So this would be: $$E[\sqrt{x}]=\sum_{x=0}^{\infty}\sqrt{x} \cdot \frac{\lambda^x e^{-\lambda}}{x!}$$. This most likely doesn't have a nice cancellation that $E[X]$ does and my guess would be there is no closed solution to this expectation. From what I have found the variance should indeed be something close to 1/4, so all is looking good. :)
 
I was reading documentation about the soundness and completeness of logic formal systems. Consider the following $$\vdash_S \phi$$ where ##S## is the proof-system making part the formal system and ##\phi## is a wff (well formed formula) of the formal language. Note the blank on left of the turnstile symbol ##\vdash_S##, as far as I can tell it actually represents the empty set. So what does it mean ? I guess it actually means ##\phi## is a theorem of the formal system, i.e. there is a...

Similar threads

Replies
42
Views
4K
Replies
30
Views
4K
Replies
9
Views
2K
Replies
7
Views
2K
Replies
1
Views
8K
Replies
3
Views
1K
Back
Top