Classify the following experiments into random or deterministic
In [1]:
# Ex 1
Is it random or deterministic?
Answer: Random
In [ ]:
In [5]:
import random
In [4]:
discs = ['D1', 'D2', 'D3', 'D4', 'D5']
Given the following code:
In [6]:
random.choice(discs)
Out[6]:
What's the probability of picking 'D3'
?
Answer: 1/5
In [7]:
discs[0]
Out[7]:
What's the probability of picking D1? What's the probability of picking D4?
In [8]:
discs[:3]
Out[8]:
In [9]:
random.choice(discs[:3])
Out[9]:
In [ ]:
D