Expected value: Suppose people randomly pick a number between 0 and 1....

Steven G

Elite Member
Joined
Dec 30, 2014
Messages
14,591
Hi,
Suppose people randomly pick a number between 0 and 1. What would be the expected number of people you would have to ask for numbers if you want the sum to be greater than 1 for the 1st time?
Steve
 
Last edited:
Of course not, there are more numbers between 1 and 10, than 0 and 1:shock:. Didn't you learn anything from this forum?
Hokay: how many numbers are there between 0 and 1? Zillions?
.1, .11, .111, ......, .111111111111111111111111111111111111111111
 
Hokay: how many numbers are there between 0 and 1? Zillions?
.1, .11, .111, ......, .111111111111111111111111111111111111111111
Between 0 and 1, I'd say about 100. Just like in the supermarkets. A zillion is out of my range.
 
Last edited:
Well, your post is too mysterious for li'l ole me...
going back to learning the "times 3" table; much tuffer than the "times 1" :(
 
Well, your post is too mysterious for li'l ole me...
going back to learning the "times 3" table; much tuffer than the "times 1" :(
Asked 1st person to pick a number between 0 and 1. If the sum of the numbers chosen is more than 1 (which is impossible at this stage) stop. Otherwise,
Asked 2nd person to pick a number between 0 and 1. If the sum of the numbers chosen is more than 1 stop. Otherwise,
Asked 3rd person to pick a number between 0 and 1. If the sum of the numbers chosen is more than 1 stop. Otherwise,
.
.
.
What is the expected number of people you would have to ask?
 
Asked 1st person to pick a number between 0 and 1. If the sum of the numbers chosen is more than 1 (which is impossible at this stage) stop. Otherwise,
Asked 2nd person to pick a number between 0 and 1. If the sum of the numbers chosen is more than 1 stop. Otherwise,
Asked 3rd person to pick a number between 0 and 1. If the sum of the numbers chosen is more than 1 stop. Otherwise,
.
.
.
What is the expected number of people you would have to ask?
Suppose that N1 & N2\displaystyle N_1~\&~N_2 choices then if {N1,N2}[0.5,1]\displaystyle \{N_1,N_2\}\subset[0.5,1] then N1+N21\displaystyle N_1+N_2\ge1 and P(N1,N2)=.25\displaystyle \mathcal{P}(N_1,N_2)=.25.
BUT if {N1,N2}[0,0.5)\displaystyle \{N_1,N_2\}\subset[0,0.5) then N1+N2<1\displaystyle N_1+N_2<1, while still P(N1,N2)=.25\displaystyle \mathcal{P}(N_1,N_2)=.25.

However it gets even more messy. What if N1=0.2 & N2=0.9\displaystyle N_1=0.2~\&~N_2=0.9 with the same probability, (N1+N2)>1\displaystyle (N_1+N_2)>1.
What if N1=0.2 & N2=0.7\displaystyle N_1=0.2~\&~N_2=0.7 with the same probability, (N1+N2)<1\displaystyle (N_1+N_2)<1
I am saying the the modeling here stumps me. I'll sleep on it.

 
Hi,
Suppose people randomly pick a number between 0 and 1. What would be the expected number of people you would have to ask for numbers if you want the sum to be greater than 1 for the 1st time?
Steve

I would think 3.

E(X1) = 0.5
E(X2) = 0.5
E(X3) = 0.5

So, since they are independent, E(X1+X2+X3) = 1.5 >1, E(X1 +X2) is not >1.

Is that too simple??
 
Hi,
Suppose people randomly pick a number between 0 and 1. What would be the expected number of people you would have to ask for numbers if you want the sum to be greater than 1 for the 1st time?
Steve

after toying with this for a while I think i've got it.

the probability it takes n\displaystyle n uniform[0,1] addends to sum to greater than 1 is given by

0101x101x1x2 ⁣01k=1n2xk1k=1n1 xk1 1 dxn dxn1 dx2 dx1\displaystyle \Large \displaystyle \int_0^1 \int_0^{1-x_1}\int_0^{1-x_1-x_2} \dots \int_0^{1-\sum \limits_{k=1}^{n-2}x_k}\int_{1-\sum \limits_{k=1}^{n-1}~x_k}^1~1~dx_n~dx_{n-1}~\dots dx_2~dx_1

This generates numbers in agreement with what I saw in the sim.

This is the integral over the probability mass where the first (n-1) variables sum to less than one but the sum over all n sums to greater than 1.

p[2]=12p[3]=13p[4]=18p[5]=1144p[k]=1k!+(k1)!\displaystyle p[2]=\dfrac 1 2\\p[3]=\dfrac 1 3\\p[4] = \dfrac 1 8\\p[5]=\dfrac{1}{144} \\ p[k] = \dfrac{1}{k!+(k-1)!}

E[k]=e\displaystyle E[k]=e
 
Last edited:
after toying with this for a while I think i've got it.

the probability it takes n\displaystyle n uniform[0,1] addends to sum to greater than 1 is given by

0101x101x1x2 ⁣01k=1n2xk1k=1n1 xk1 1 dxn dxn1 dx2 dx1\displaystyle \Large \displaystyle \int_0^1 \int_0^{1-x_1}\int_0^{1-x_1-x_2} \dots \int_0^{1-\sum \limits_{k=1}^{n-2}x_k}\int_{1-\sum \limits_{k=1}^{n-1}~x_k}^1~1~dx_n~dx_{n-1}~\dots dx_2~dx_1

This generates numbers in agreement with what I saw in the sim.

This is the integral over the probability mass where the first (n-1) variables sum to less than one but the sum over all n sums to greater than 1.

p[2]=12p[3]=13p[4]=18p[5]=1144p[k]=1k!+(k1)!\displaystyle p[2]=\dfrac 1 2\\p[3]=\dfrac 1 3\\p[4] = \dfrac 1 8\\p[5]=\dfrac{1}{144} \\ p[k] = \dfrac{1}{k!+(k-1)!}

E[k]=e\displaystyle E[k]=e
Yep, you got the correct result.
 
This is meaningless until you specify a probability distribution.

Come on Halls, you're better than that. Someone says randomly between zero and one and nothing else it's uniform[0,1].

If they come back and say, that's not what they meant then you can rail on them.
 
Top