Re: Problem with random variable generation
- From: "Greg Heath" <heath@xxxxxxxxxxxxxxxx>
- Date: 3 Dec 2005 20:16:03 -0800
E.S. wrote:
> Hi Greg!
> Thank you for your prompt reply. I will try to answer the questions
> you have posted in your message.
>
> "How do you define the standard deviation of a complex random
> variable?"
> For a complex random variable, Z=X+jY, the variance is defined as
> E{Z*conj(Z)}=E{X^2}+E{Y^2}, assuming X and Y are independent.
Not quite.
If E{Z} = Z0, it must be E{ (Z-Z0)*conj(Z-Z0)} =
E{(X-X0)^2}+E{(Y-Y0)^2}
even if X and Y are correlated.
> If E{X^2}=E{Y^2}=sigma^2/2 then E{Z*conj(Z)}=sigma^2. This is in an
> agreement with your simulation results. Initially, you assumed the
> variance of 1, and for 10^6 iterations you achived the result.
> However, the problem lies in the fact that for E{Z^2}, theoretically,
> the result should be equal to zero, and in MATLAB we get some value
> approx. equal to 10^-4 (both of us got very similar results).
>
> "You are forgetting about the perennial problems of roundoff and/or
> truncation errors."
>
> This is what I am wondering about. Is it a problem with rounding off
> or some problem with a random generator? I am not sure! It seems to
> me that the random generator employed in MATLAB is producing somewhat
> correlated "random" variables, that is, different runs do not ensure
> independent random variables. In my simulations, the value I was
> getting for E{Z^2} is exactly equal to j*2*E{X*Y}.
"exactly"? That sounds fishy. Did you print the results using format
long?
> "I'm not sure what you did, but my derivations were less than 10
> lines."
>
> I am doing this huge derivations for the IF estimation.
IF? What is that?
> They are
> very, very long, not the derivation for the expected value of
> Z*conj(Z) and Z^2.
>
> "It's not MATLAB. You have to adjust your expectations (no pun
> intended) when dealing with finite computation machines."
>
> Again, going back to the previous comment. This is what I am
> wondering about. But, thanks anyway for your time!
Roger has pointed out that it is probably just probabilistic estimation
error. Calculations of
sqrt(VAR(E{Z^2})) and sqrt(VAR(E{|Z|^2}))
are in order.
Hope this helps.
Greg
.
- Follow-Ups:
- Re: Problem with random variable generation
- From: Greg Heath
- Re: Problem with random variable generation
- References:
- Problem with random variable generation
- From: E . S .
- Re: Problem with random variable generation
- From: Greg Heath
- Re: Problem with random variable generation
- From: E . S .
- Problem with random variable generation
- Prev by Date: Re: fmincon question
- Next by Date: Re: What's the order of the eigenvector ?
- Previous by thread: Re: Problem with random variable generation
- Next by thread: Re: Problem with random variable generation
- Index(es):
Relevant Pages
|