1
$\begingroup$

Suppose we consider an urn with 3 red balls and 5 blue balls. We now draw two balls without replacement. If we draw a red, it is a success otherwise a failure. Let X=1 if we draw a red ball in the first pick (X=0 otherwise). Let Y=1 if we draw a red ball in the second pick (Y=0 otherwise). I know that P(X=1)=3/8 and P(Y=1| X=1)=2/7

But how can I calculate P(Y=1)?

$\endgroup$
2
  • $\begingroup$ You might wish to read through this worked example. $\endgroup$
    – Galen
    Commented Jul 9, 2021 at 15:38
  • 2
    $\begingroup$ When your question is isolated and stripped to its essential information -- "what is the chance that a ball drawn from an urn containing 3 red and 5 non-red balls is red" -- the answer is immediate. $\endgroup$
    – whuber
    Commented Jul 9, 2021 at 15:56

1 Answer 1

2
$\begingroup$

The two are trials dependent, so this is the marginal probability averaged across situations when X = 0 and X = 1.

On the second draw, there's either:

  • 2 red balls and 5 blue balls (2/7), which has a probability of 3/8 of occurring (this is conditioning on X = 1)

  • 3 red balls and 4 blue balls (3/7), which has a probability of 5/8 of occurring (this is conditioning on X = 0)

It is a weighted average of 2/7 and 3/7, with the weights being those probabilities based on the first draw, X:

((2/7) * (3/8) + (3/7) * (5/8)) = 3/8.

Simulation verifying this, in R:

set.seed(1839)
balls <- c(1, 1, 1, 0, 0, 0, 0, 0) # 0 is blue, 1 is red
res <- replicate(500000, sample(balls, size = 2, replace = FALSE))

# this returns a matrix with 500,000 columns
# the second row represents the second draw
# how many of these are 1?
prop.table(table(res[2, ]))

That returns 0.375028, or about 3/8:

       0        1 
0.624972 0.375028 

As a bonus, you can also look at the probability of each specific combination:

library(tidyverse)
res %>% 
  t() %>% 
  as_tibble() %>% 
  set_names(c("draw1", "draw2")) %>% 
  count(draw1, draw2) %>% 
  mutate(pct = n / sum(n) * 100)

Which gives us:

# A tibble: 4 x 4
  draw1 draw2      n   pct
  <dbl> <dbl>  <int> <dbl>
1     0     0 178551  35.7
2     0     1 133971  26.8
3     1     0 133935  26.8
4     1     1  53543  10.7

Rows 2 and 4 represent the two situations where the second draw (Y) can be 1. And 26.8% + 10.7% = 37.5%, or 3/8 probability.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.