# 1/30/2023

## Final Remarks on Categorical Data (for now)

• See CategoricalSummaries.R
• Watch the video GoogleDrive/R videos and scripts for Kenyon College/MosaicPlots-final
• One last Example - Simpson's Paradox

## Introduction to Probability

Relative Frequency Interpretation

• The probability of an event A, say P(A), is the long-run relative frequency of the event.  That is, we independently repeat a random experiment n times and keep track of the fraction of experiments in which the event A occurs.  The relative frequency interpretation of P(A) is then the long-run proportion of independent experiments in which A occurs.

Logical Probability

• If a random experiment can result in any one of n equally likely outcomes, then the probability of an event A, say P(A), is equal to one over the number of equally likely outcomes. i.e., P(A)=1/n.

Subjective Probability

• The probability of an event, say P(A), is a number between 0 and 1, inclusive, which measures an individual’s degree of belief in the event.

## Using Simulation to Estimate Probabilities

• Demonstration with R (flipping an unbalanced coin 1000 times - see ProbSim.R)
• Small Group Activity - Estimating Probabilities
• Tossing and spinning coins
• Rolling dice
• Dealing cards

## Basic Probability Definitions

• The sample space S of a random experiment is the set of all outcomes.
• A random variable is a variable that takes on numerical values determined by the outcome of a random experiment.
• An event is a subset of S.

## Example - Rolling a pair of dice

• Identify the sample space.
• Find the probability that the number of dots on the upward facing sides is 6.

## Probabilities in a Finite Sample Space

• Assign probabilities to each basic outcome.
• Compute the probability of the event of interest by summing the probabilities of the basic outcomes making up the event.

## Addition Rule for Disjoint Events

• Two events, say A and B, are called disjoint events if they have no outcomes in common.  If events A and B are disjoint, then P(A or B) = P(A) + P(B).
• Find the probability of getting a 2 or a 6 when rolling two dice.

## Complement Rule

• If A is any event, the set of basic outcomes that are not in A is called the complement of A and denoted Ac.
• For any event A, the probability that A does not occur is P(Ac) = 1 - P(A)
• Find the probability of getting an even number when rolling a pair of dice.

## Multiplication Rule for Independent Events

• Events A and B are independent if knowledge of the occurrence of one event does not change the probability that the other occurs.
• If A and B are independent events, then P(A and B) = P(A) x P(B)