[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.11461029 [View]
File: 80 KB, 602x604, 1583598957536.jpg [View same] [iqdb] [saucenao] [google]
11461029

Probability question (not a homework, just something I'm curious about, from a game):
>You have a deck of 40 cards
>3 cards in a deck are red, and 37 cards in a deck are blue
>You draw 4 cards from the deck, you can do it 2 times (with returning them to deck)
>So you draw twice from a deck of 40 random cards, 3 of which are red
>What is the probability of drawing at least 1 red card after the second draw?

I figured out the answer to similar question, which has drawing 4 cards just ONCE, and it's:

[math]1-\dfrac{37\choose 4}{40\choose 4} \approx 0.277[/math]
1 minus the probability that you don't draw it, basically. Or, equivalently:

[math]\dfrac{{3\choose 1}{37\choose 3}+{3\choose 2}{37\choose 2}+{3\choose 3}{37\choose 1}}{40\choose 4} \approx 0.277[/math]

So you have about 27.73% of drawing at least one of red cards, IF you draw 4 cards ONCE.

But what if you draw twice? I thought that [math]2\times0.277=0.554[/math] could be about it, but that's not the case.
I wrote a python script and after a lot of iterations of such "games" the answer is about 47-48%, not 55%.

Here's the script: https://repl.it/repls/TidyWickedIntegers

What should I take into account calculating the second draw?

Probably the fact that you sometimes don't go into the second drawing phase? But how to write it mathematically?

Navigation
View posts[+24][+48][+96]