probs line of code
probs line of code
Code:
o tosscoin(1) and tosscoin(3): Simulates tossing one or three coins. It provides the
sample space (e.g., Heads or Tails outcomes).
o rolldie(1) and rolldie(3): Simulates rolling one or three dice, providing all possible
outcomes.
Events:
o subset func ons are used to filter specific outcomes based on condi ons (e.g., cards
of "Heart" suit or rolling a sum > 16 with 3 dice).
Code:
o Union: Combines two sets (e.g., all cards that are either "Hearts" or rank 7–9).
Purpose: Helps analyze rela onships and probabili es between sets of outcomes.
3. Calcula ng Probabili es
Code:
Example:
Code:
o Measures of Shape:
Code:
6. Hypothesis Tes ng
Code:
Example: