A probability space is defined as a triple $(\Omega, E, P)$, where $\Omega$ is a set of outcomes(also called sample space), $E$ is an event space, and $P$ is a probability function that maps $E \to [0, 1]$. Consider an experiment where two coins are tossed. The $\Omega$ is then:
given that 'H' is a "heads", and "T" is a "tails".
A probabilistic model involves a process known as the experiment, which produces exactly one out of all the possible outcomes in the sample space. This subset of the sample space is known as an event. There is always only one experiment. Sample space may consist of finite or infinite number of outcomes.
$F$, an event can be defined when two heads or two tails occuring together. $F$ would be a subset of $\Omega$ outcomes consisting of:
The countable additivity property would therefore allow a computation of the probability of the occurence of the event as shown:
<img src="../images/probability_spaces1.png", style="width: 600px;">
$P$ would therefore be:
$$P = \frac{No. of Events}{No. of Outcomes}$$Consider an experiment where two dice are rolled.
# Complete the assignment below.
# space_size = ?
The samples should be combinations of 6*6
space_size = 36
print("Sample Size is ", space_size)
Sample Size is 36
ref_tmp_var = False
try:
if space_size == 36:
ref_assert_var = True
ref_tmp_var = True
else:
ref_assert_var = False
print('Please follow the instructions given and use the same variables provided in the instructions. ')
except Exception:
print('Please follow the instructions given and use the same variables provided in the instructions. ')
assert ref_tmp_var
continue
Given an experiment and set of possible outcomes, random variable associates a particular number to each outcome. Consider an event where a coin is tossed twice. The random variable where number of Heads occur is denoted as: $$ X \to \{0, 1, 2\}$$ Random variables can be either continuous or discrete. A random variable is discrete if its range is finite or at most countably infinite. A random variable is continuous if it can take uncountably infinite number of values.
S = []
Use range() and list() functions.
S = list(range(2, 13))
print(S)
[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
ref_tmp_var = False
import numpy as np
try:
if np.all(S == list(range(2, 13))):
ref_assert_var = True
ref_tmp_var = True
else:
ref_assert_var = False
print('Please follow the instructions given and use the same variables provided in the instructions. ')
except Exception:
print('Please follow the instructions given and use the same variables provided in the instructions. ')
assert ref_tmp_var
continue