What is the probability of the following event?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
Let $X_1, X_2, X_3, X_4$ be independent Bernoulli random variables. Then
beginalign
Pr[X_i=1]=Pr[X_i=0]=1/2.
endalign
I want to compute the following probability
beginalign
Pr( X_1+X_2+X_3=2, X_2+X_4=1 ).
endalign
My solution: Suppose that $X_1+X_2+X_3=2$ and $X_2+X_4=1$. Then $(X_2, X_4)=(0,1)$ or $(1,0)$. The probabilities of $(X_2, X_4)=(0,1)$ and $(1,0)$ are both $1/2 times 1/2 = 1/4$. If $(X_2, X_4)=(0,1)$, then $X_1+X_2+X_3=X_1+X_3=2$. Therefore $X_1 = X_3 =1$. This happens with probability $1/4$. If $(X_2, X_4)=(1,0)$, then $X_1+X_2+X_3=X_1+1+X_3=2$. Therefore $(X_1, X_3) in (1,0), (0,1)$. This happens with probability $1/4$. Therefore
beginalign
Pr( X_1+X_2+X_3=2, X_2+X_4=1 ) = 1/16+2/16=3/16.
endalign
Is this correct? Thank you very much.
probability
add a comment |Â
up vote
1
down vote
favorite
Let $X_1, X_2, X_3, X_4$ be independent Bernoulli random variables. Then
beginalign
Pr[X_i=1]=Pr[X_i=0]=1/2.
endalign
I want to compute the following probability
beginalign
Pr( X_1+X_2+X_3=2, X_2+X_4=1 ).
endalign
My solution: Suppose that $X_1+X_2+X_3=2$ and $X_2+X_4=1$. Then $(X_2, X_4)=(0,1)$ or $(1,0)$. The probabilities of $(X_2, X_4)=(0,1)$ and $(1,0)$ are both $1/2 times 1/2 = 1/4$. If $(X_2, X_4)=(0,1)$, then $X_1+X_2+X_3=X_1+X_3=2$. Therefore $X_1 = X_3 =1$. This happens with probability $1/4$. If $(X_2, X_4)=(1,0)$, then $X_1+X_2+X_3=X_1+1+X_3=2$. Therefore $(X_1, X_3) in (1,0), (0,1)$. This happens with probability $1/4$. Therefore
beginalign
Pr( X_1+X_2+X_3=2, X_2+X_4=1 ) = 1/16+2/16=3/16.
endalign
Is this correct? Thank you very much.
probability
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Let $X_1, X_2, X_3, X_4$ be independent Bernoulli random variables. Then
beginalign
Pr[X_i=1]=Pr[X_i=0]=1/2.
endalign
I want to compute the following probability
beginalign
Pr( X_1+X_2+X_3=2, X_2+X_4=1 ).
endalign
My solution: Suppose that $X_1+X_2+X_3=2$ and $X_2+X_4=1$. Then $(X_2, X_4)=(0,1)$ or $(1,0)$. The probabilities of $(X_2, X_4)=(0,1)$ and $(1,0)$ are both $1/2 times 1/2 = 1/4$. If $(X_2, X_4)=(0,1)$, then $X_1+X_2+X_3=X_1+X_3=2$. Therefore $X_1 = X_3 =1$. This happens with probability $1/4$. If $(X_2, X_4)=(1,0)$, then $X_1+X_2+X_3=X_1+1+X_3=2$. Therefore $(X_1, X_3) in (1,0), (0,1)$. This happens with probability $1/4$. Therefore
beginalign
Pr( X_1+X_2+X_3=2, X_2+X_4=1 ) = 1/16+2/16=3/16.
endalign
Is this correct? Thank you very much.
probability
Let $X_1, X_2, X_3, X_4$ be independent Bernoulli random variables. Then
beginalign
Pr[X_i=1]=Pr[X_i=0]=1/2.
endalign
I want to compute the following probability
beginalign
Pr( X_1+X_2+X_3=2, X_2+X_4=1 ).
endalign
My solution: Suppose that $X_1+X_2+X_3=2$ and $X_2+X_4=1$. Then $(X_2, X_4)=(0,1)$ or $(1,0)$. The probabilities of $(X_2, X_4)=(0,1)$ and $(1,0)$ are both $1/2 times 1/2 = 1/4$. If $(X_2, X_4)=(0,1)$, then $X_1+X_2+X_3=X_1+X_3=2$. Therefore $X_1 = X_3 =1$. This happens with probability $1/4$. If $(X_2, X_4)=(1,0)$, then $X_1+X_2+X_3=X_1+1+X_3=2$. Therefore $(X_1, X_3) in (1,0), (0,1)$. This happens with probability $1/4$. Therefore
beginalign
Pr( X_1+X_2+X_3=2, X_2+X_4=1 ) = 1/16+2/16=3/16.
endalign
Is this correct? Thank you very much.
probability
asked 2 days ago
LJR
6,41841645
6,41841645
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
2
down vote
Let's verify your result by simulation using a Python script:
import numpy as np
N = 10**5 # number of trials
# list of N 4-ples (X1, X2, X3, X4)
XX = [np.random.randint(2, size=4) for n in np.arange(N)]
# list of trials outcomes
P = list(map(lambda X: (X[0]+X[1]+X[2]==2)&(X[2]+X[3]==1), XX))
# average of successes
np.mean(P) # ~ 0.18772
Since $frac316 simeq 0.18772$ this confirms your result.
thank you very much. Your codes are very helpful. Are these python codes?
– LJR
2 days ago
@LJR You're welcome! Yes they are! I'll edit the answer
– Giulio Scattolin
2 days ago
add a comment |Â
up vote
2
down vote
Just add as a supplementary technique:
You may also try to use the law of total probability with conditioning on $X_2$, since only $X_2$ are in common of the two events, then make use of the independence:
$$ beginalign &PrX_1 + X_2 + X_3 = 2, X_2 + X_4 = 1 \
=& PrX_2 = 0PrX_2 = 0 \
&+ PrX_1 + X_2 + X_3 = 2, X_2 + X_4 = 1PrX_2 = 1 \
=& PrX_1 + X_3 = 2, X_4 = 1PrX_2 = 0 \
&+ PrX_2 = 1PrX_2 = 1 \
=& PrX_1 + X_3 = 2PrX_4 = 1PrX_2 = 0 + \
&+ PrX_1 + X_3 = 1PrX_4 = 0PrX_2 = 1 \
=& frac 1 4times frac 1 2 times frac 1 2 + frac 1 2 times frac 1 2 times frac 1 2 \
=& frac 3 16
endalign$$
So essentially you have counted the cases, just like what you have did.
add a comment |Â
up vote
1
down vote
Yes, your solution is indeed correct!
Minor comment: In the last sentence before the final expression "this" is probably referred to each of the outcomes $(1, 0)$ and $(0, 1)$ rather than to the event $(X_1, X_3) in (1, 0), (0, 1) $.
1
@Pointguardo, yes, thank you very much for your comments.
– LJR
2 days ago
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Let's verify your result by simulation using a Python script:
import numpy as np
N = 10**5 # number of trials
# list of N 4-ples (X1, X2, X3, X4)
XX = [np.random.randint(2, size=4) for n in np.arange(N)]
# list of trials outcomes
P = list(map(lambda X: (X[0]+X[1]+X[2]==2)&(X[2]+X[3]==1), XX))
# average of successes
np.mean(P) # ~ 0.18772
Since $frac316 simeq 0.18772$ this confirms your result.
thank you very much. Your codes are very helpful. Are these python codes?
– LJR
2 days ago
@LJR You're welcome! Yes they are! I'll edit the answer
– Giulio Scattolin
2 days ago
add a comment |Â
up vote
2
down vote
Let's verify your result by simulation using a Python script:
import numpy as np
N = 10**5 # number of trials
# list of N 4-ples (X1, X2, X3, X4)
XX = [np.random.randint(2, size=4) for n in np.arange(N)]
# list of trials outcomes
P = list(map(lambda X: (X[0]+X[1]+X[2]==2)&(X[2]+X[3]==1), XX))
# average of successes
np.mean(P) # ~ 0.18772
Since $frac316 simeq 0.18772$ this confirms your result.
thank you very much. Your codes are very helpful. Are these python codes?
– LJR
2 days ago
@LJR You're welcome! Yes they are! I'll edit the answer
– Giulio Scattolin
2 days ago
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Let's verify your result by simulation using a Python script:
import numpy as np
N = 10**5 # number of trials
# list of N 4-ples (X1, X2, X3, X4)
XX = [np.random.randint(2, size=4) for n in np.arange(N)]
# list of trials outcomes
P = list(map(lambda X: (X[0]+X[1]+X[2]==2)&(X[2]+X[3]==1), XX))
# average of successes
np.mean(P) # ~ 0.18772
Since $frac316 simeq 0.18772$ this confirms your result.
Let's verify your result by simulation using a Python script:
import numpy as np
N = 10**5 # number of trials
# list of N 4-ples (X1, X2, X3, X4)
XX = [np.random.randint(2, size=4) for n in np.arange(N)]
# list of trials outcomes
P = list(map(lambda X: (X[0]+X[1]+X[2]==2)&(X[2]+X[3]==1), XX))
# average of successes
np.mean(P) # ~ 0.18772
Since $frac316 simeq 0.18772$ this confirms your result.
edited 2 days ago
answered 2 days ago
Giulio Scattolin
1568
1568
thank you very much. Your codes are very helpful. Are these python codes?
– LJR
2 days ago
@LJR You're welcome! Yes they are! I'll edit the answer
– Giulio Scattolin
2 days ago
add a comment |Â
thank you very much. Your codes are very helpful. Are these python codes?
– LJR
2 days ago
@LJR You're welcome! Yes they are! I'll edit the answer
– Giulio Scattolin
2 days ago
thank you very much. Your codes are very helpful. Are these python codes?
– LJR
2 days ago
thank you very much. Your codes are very helpful. Are these python codes?
– LJR
2 days ago
@LJR You're welcome! Yes they are! I'll edit the answer
– Giulio Scattolin
2 days ago
@LJR You're welcome! Yes they are! I'll edit the answer
– Giulio Scattolin
2 days ago
add a comment |Â
up vote
2
down vote
Just add as a supplementary technique:
You may also try to use the law of total probability with conditioning on $X_2$, since only $X_2$ are in common of the two events, then make use of the independence:
$$ beginalign &PrX_1 + X_2 + X_3 = 2, X_2 + X_4 = 1 \
=& PrX_2 = 0PrX_2 = 0 \
&+ PrX_1 + X_2 + X_3 = 2, X_2 + X_4 = 1PrX_2 = 1 \
=& PrX_1 + X_3 = 2, X_4 = 1PrX_2 = 0 \
&+ PrX_2 = 1PrX_2 = 1 \
=& PrX_1 + X_3 = 2PrX_4 = 1PrX_2 = 0 + \
&+ PrX_1 + X_3 = 1PrX_4 = 0PrX_2 = 1 \
=& frac 1 4times frac 1 2 times frac 1 2 + frac 1 2 times frac 1 2 times frac 1 2 \
=& frac 3 16
endalign$$
So essentially you have counted the cases, just like what you have did.
add a comment |Â
up vote
2
down vote
Just add as a supplementary technique:
You may also try to use the law of total probability with conditioning on $X_2$, since only $X_2$ are in common of the two events, then make use of the independence:
$$ beginalign &PrX_1 + X_2 + X_3 = 2, X_2 + X_4 = 1 \
=& PrX_2 = 0PrX_2 = 0 \
&+ PrX_1 + X_2 + X_3 = 2, X_2 + X_4 = 1PrX_2 = 1 \
=& PrX_1 + X_3 = 2, X_4 = 1PrX_2 = 0 \
&+ PrX_2 = 1PrX_2 = 1 \
=& PrX_1 + X_3 = 2PrX_4 = 1PrX_2 = 0 + \
&+ PrX_1 + X_3 = 1PrX_4 = 0PrX_2 = 1 \
=& frac 1 4times frac 1 2 times frac 1 2 + frac 1 2 times frac 1 2 times frac 1 2 \
=& frac 3 16
endalign$$
So essentially you have counted the cases, just like what you have did.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Just add as a supplementary technique:
You may also try to use the law of total probability with conditioning on $X_2$, since only $X_2$ are in common of the two events, then make use of the independence:
$$ beginalign &PrX_1 + X_2 + X_3 = 2, X_2 + X_4 = 1 \
=& PrX_2 = 0PrX_2 = 0 \
&+ PrX_1 + X_2 + X_3 = 2, X_2 + X_4 = 1PrX_2 = 1 \
=& PrX_1 + X_3 = 2, X_4 = 1PrX_2 = 0 \
&+ PrX_2 = 1PrX_2 = 1 \
=& PrX_1 + X_3 = 2PrX_4 = 1PrX_2 = 0 + \
&+ PrX_1 + X_3 = 1PrX_4 = 0PrX_2 = 1 \
=& frac 1 4times frac 1 2 times frac 1 2 + frac 1 2 times frac 1 2 times frac 1 2 \
=& frac 3 16
endalign$$
So essentially you have counted the cases, just like what you have did.
Just add as a supplementary technique:
You may also try to use the law of total probability with conditioning on $X_2$, since only $X_2$ are in common of the two events, then make use of the independence:
$$ beginalign &PrX_1 + X_2 + X_3 = 2, X_2 + X_4 = 1 \
=& PrX_2 = 0PrX_2 = 0 \
&+ PrX_1 + X_2 + X_3 = 2, X_2 + X_4 = 1PrX_2 = 1 \
=& PrX_1 + X_3 = 2, X_4 = 1PrX_2 = 0 \
&+ PrX_2 = 1PrX_2 = 1 \
=& PrX_1 + X_3 = 2PrX_4 = 1PrX_2 = 0 + \
&+ PrX_1 + X_3 = 1PrX_4 = 0PrX_2 = 1 \
=& frac 1 4times frac 1 2 times frac 1 2 + frac 1 2 times frac 1 2 times frac 1 2 \
=& frac 3 16
endalign$$
So essentially you have counted the cases, just like what you have did.
answered 2 days ago
BGM
3,450148
3,450148
add a comment |Â
add a comment |Â
up vote
1
down vote
Yes, your solution is indeed correct!
Minor comment: In the last sentence before the final expression "this" is probably referred to each of the outcomes $(1, 0)$ and $(0, 1)$ rather than to the event $(X_1, X_3) in (1, 0), (0, 1) $.
1
@Pointguardo, yes, thank you very much for your comments.
– LJR
2 days ago
add a comment |Â
up vote
1
down vote
Yes, your solution is indeed correct!
Minor comment: In the last sentence before the final expression "this" is probably referred to each of the outcomes $(1, 0)$ and $(0, 1)$ rather than to the event $(X_1, X_3) in (1, 0), (0, 1) $.
1
@Pointguardo, yes, thank you very much for your comments.
– LJR
2 days ago
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Yes, your solution is indeed correct!
Minor comment: In the last sentence before the final expression "this" is probably referred to each of the outcomes $(1, 0)$ and $(0, 1)$ rather than to the event $(X_1, X_3) in (1, 0), (0, 1) $.
Yes, your solution is indeed correct!
Minor comment: In the last sentence before the final expression "this" is probably referred to each of the outcomes $(1, 0)$ and $(0, 1)$ rather than to the event $(X_1, X_3) in (1, 0), (0, 1) $.
answered 2 days ago
pointguard0
512215
512215
1
@Pointguardo, yes, thank you very much for your comments.
– LJR
2 days ago
add a comment |Â
1
@Pointguardo, yes, thank you very much for your comments.
– LJR
2 days ago
1
1
@Pointguardo, yes, thank you very much for your comments.
– LJR
2 days ago
@Pointguardo, yes, thank you very much for your comments.
– LJR
2 days ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2871949%2fwhat-is-the-probability-of-the-following-event%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password