There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
You can also find further discussion and get answers to your questions over in Language Help.
Agree with a comment or answer? Like () to up-vote the contribution!
We pick out two cards from a standard deck of 52 cards without replacement. Event A is that we pick an Ace on the first draw. Event B is that we pick an Ace on the second draw. Are events A and B independent?
I’m finding it difficult to understand the answer here (independent). If the cards are not replaced then I feel that the first card will modify the odds (albeit narrowly) of the next card being an Ace. E.g on the first draw, there is a 4 in 52 chance that the card is an ace. Say an Ace is pulled, then the chances of an Ace being pulled again on the second draw is 3 in 51. Therefore, I do not understand how the draws are independent. Any advice appreciated!
Hi - You are correct and the Codecademy module said as much under the “Hints” section. I found that the “run” button did not indicate whether my answer was correct or not, it sounds like this confused you as well. They explain their answer under the “Hints” section where they stated:
"Since we take out two cards without replacement, the outcome of picking out an ace second is dependent on what card we take out first. If we take out an ace first, the probability that we pick out an ace second is 3/51. If we don’t pick out an ace first, the probability we pick out an ace is 4/51.
You should denote your answer in quiz.py with the following code: events_1 = “dependent”
Hi! It took me a while, but I think you were confused like me in the structure of the answers.
They have three outcomes for three different exercises (which I understood only later). So the first task is just for the event_1. And you are right, they first draw of a card is an independent event, but the next ones are dependent (it’s like with marbles). So they ask you about the whole idea: is drawing cards from a deck a dependent or independent event. And it is dependent. So the first one is dependent but the other two are independent.
Also, when you check answers it only checks the event it is supposed to check. So if you check task 2 and change the answer in event_1 to “independent” it will still accept your answer but not because you are right, but just because they don’t look at this answer anymore.