Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.6K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Conditional expectation of variable drawn from uniform distribution with different domains

Posted 1 year ago
POSTED BY: Anne Shirley
2 Replies
Posted 1 year ago

Thank you so much!

POSTED BY: Anne Shirley
Posted 1 year ago

I think a direct integration over the conditioned area works:

(* Set parameters *)
m = 1/16;
t = 3/4;

(* Mean by integration *)
bMean = Integrate[b, {a, m, m + 1}, {b, 0, Min[a/t, 1]}]/
        Integrate[1, {a, m, m + 1}, {b, 0, Min[a/t, 1]}] // N
(* 0.410541 *)

This can be checked with simulations:

(* Mean by simulations *)
n = 1000000;
aa = RandomVariate[UniformDistribution[{m, m + 1}], n];
bb = RandomVariate[UniformDistribution[{0, 1}], n];
data = Transpose[{aa, bb}];
data2 = Select[data, #[[1]] >= t  #[[2]] &];
Mean[data2[[All, 2]]]
(* 0.410485 *)

Or one can do it without specific values for $m$ and $t$:

t =.;
m =.;
bMean = Integrate[b, {a, m, m + 1}, {b, 0, Min[a/t, 1]}, Assumptions -> {0 < m < 1, 0 < t < 1}]/
    Integrate[1, {a, m, m + 1}, {b, 0, Min[a/t, 1]}, Assumptions -> {0 < m < 1, 0 < t < 1}] // PiecewiseExpand // FullSimplify

Conditional expectation of b given a >= b t

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard