A card stack contains white and black cards. Two cards are drawn randomly without replacement. The probability of selecting a white and then a black card is x. The probability of selecting a white card in the first draw is y. You have to find the probability of drawing a black card, given that the first card drawn was white. The input will contain two lines with x and y respectively. The output should be displayed as a float(no need to round it off). Sample input: 0.2 0.5 sample output: 0.4
Answers
Answer:
x/y
Step-by-step explanation:
by relation between the cards
Given : A card stack contains white and black cards Two cards are drawn randomly without replacement The probability of selecting a white and then a black card is x probability of selecting a white card in the first draw is y
To find : the probability of drawing a black card, given that the first card drawn was white
Solution:
A card stack contains white and black cards
White Card = W
Black Card = B
Probability of selecting a white and then a black card is x
=> x = (W/ ( W + B) ) * (B /( W + B - 1)
The probability of selecting a white card in the first draw is y
=> y = W/ ( W + B)
x = y * B/(W + B - 1)
=> B/(W + B - 1) = x/y
Input = x , y
Output = x/y
x = 0.2
y = 0.5
x/y = 0.2/0.5 = 2/5
= 0.4
x/y is the probability of drawing a black card, given that the first card drawn was white.
Learn more:
if two dice are tossed, find the probability of throwing a total of 10 or ...
https://brainly.in/question/7714685
If you flip three fair coins, what is the probability that you'll get all ...
https://brainly.in/question/7633345
In a Family of 3 children find probability of having at least one boy ...
https://brainly.in/question/7700718