Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Conditional expectation in matlab

1 view (last 30 days)
Sabrina Garland
Sabrina Garland on 14 Oct 2023
Closed: John D'Errico on 14 Oct 2023
I have to calculate conditional expected value of a and b. a and b are random variables that are normally distributed with mean 1/2 and variance 1/2. The support for a and b, ie. Values of a and b, falls in the interval [0,1]. I have to calculate E(a|a>b) and E(b|a>b). How can I do this in Matlab?
Help @Torsten
  6 Comments
Sabrina Garland
Sabrina Garland on 14 Oct 2023
Sorry! I mean variance of 1/2. Corrected it. Thanks for pointing it out @William Rose
William Rose
William Rose on 14 Oct 2023
Edited: William Rose on 14 Oct 2023
@Sabrina Garland, you're welcome.
[edit: correct typo. I wrote var(1)=0.5 and I meant to write var(a)=0.5]
I think you meant that the standard deviation (not variance) is 1/2. Because if var(a)=0.5 then SD=1/sqrt(2)=0.707, which is still too much, if and range is [0,1].
If I am right that mean(a)=0.5 and s.d.(a)=0.5, and if range(a)=[0,1], then you must be talking about the Bernoulli distribution, i.e. the distribution of results from a single coin flip, for an evenly-weighted coin. The result of one flip is either 0 or 1, with mean 0.5 and variance=0.25, s.d.=0.5. Any other distribution with mean=0.5 will have an s.d. that is less than 0.5.
But you also said the random variable is a gain, so I don't know what to think.
Can you give a more detailed description of what you mean by the variable being the ratio of gains? How is each gain calculated? Whay can't the gain be more than 1 or less than 0. You also called it a profit. If you have an opportunity where the profit cannot be negative, there will be a lot of intereted people... :)

Answers (0)

This question is closed.

Tags

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!