Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 ( Recall that a regular deck of 5 2 cards consists of 1 3 kinds / denominations , each having 4 suits: ,

Question 1
(Recall that a regular deck of 52 cards consists of 13 kinds/denominations, each having 4 suits: ,,.)
Suppose you take 3 cards from a regular deck of cards, one card at a time, without replacement (i.e. without putting any card back).
Part a)
What is the probability that the first, the second and the third card drawn are a Queen, a King and an Ace, respectively (i.e. in that order)? Do NOT round your answer.
Write your answer as
ans =
For example, if you think the answer is 1/36 you should create variable ans as
ans =1/36
IMPORTANT: Just typing 1/36, or answer =1/36 is not acceptable. Also, do NOT put dot at the end (this is a python code, not a sentence in English). Your answer will be graded automatically, and the test code expects you to create a Python variable called ans, and the code will test the value of ans.
# your code here
raise NotImplementedError
"""Check whether the answer is numeric and from the interval [0,1]- since it's a probability"""
assert isinstance(ans,float)
assert (0<= ans) & (ans <=1), "Sorry, the answer should be a probability, which means a number from [0,1]"
"""Check whether the answer is correct (hidden test)"""
Part b)
What is the probability that the first, the second and the third card drawn are Queen, Queen and Ace, in that order? Do NOT round your answer.
Write your answer as
ans =
# your code here
raise NotImplementedError
"""Check whether the answer is numeric and from the interval [0,1]- since it's a probability"""
assert isinstance(ans,float)
assert (0<= ans) & (ans <=1), "Sorry, the answer should be a probability, which means a number from [0,1]"
"""Check whether the answer is correct (hidden test)"""
Question 2
Consider two boxes, one containing 3 blue and 2 red marbles, the other contains 3 blue and 5 red marbles. A box is selected at random, and a marble is drawn from it at random.
Part a)
What is the probability that the selected marble is blue? Do NOT round your answer.
Create a variable pB that stores the value of this probability. That is, write your answer as
pB =
# your code here
raise NotImplementedError
"""Check whether the answer is numeric and from the interval [0,1]- since it's a probability"""
assert isinstance(pB,float)
assert (0<= pB) & (pB <=1), "Sorry, the answer should be a probability, which means a number from [0,1]"
"""Check whether the answer is correct (hidden test)"""
Part b)
If the chosen marble is blue, what is the probability that it was taken from the first box? Do NOT round your answer.
Create a variable pFgivenB which is equal to the desired probability.
pFgivenB =

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

analyze how research and writing unites with design.

Answered: 1 week ago