Graphing Probability Part 2

To graph the probability of an event, we need to use a probability density function (PDF) or a cumulative distribution function (CDF), depending on the situation.

1. PDF graph:
- Start by selecting a range for the variable of interest. For example, if you are looking at the probability of rolling a certain number on a fair six-sided die, the range would be from 1 to 6.
- Plot the variable values on the x-axis and the probability on the y-axis.
- Assign a probability value to each variable value based on the given distribution. For a fair die, each number would have a probability of 1/6.
- Connect the points to form a continuous line if the variable is continuous or use bars if the variable is discrete.
- Label the axes appropriately and add a title to the graph.

2. CDF graph:
- Similar to the PDF graph, select a range for the variable of interest.
- Plot the variable values on the x-axis and the cumulative probability on the y-axis.
- Calculate the cumulative probability for each variable value. For example, if you are rolling a fair six-sided die and want to know the probability of rolling a number less than or equal to 3, the cumulative probability for 3 would be 1/2.
- Connect the points to form a continuous line if the variable is continuous or use steps if the variable is discrete.
- Label the axes and add a title to the graph.

Both types of graphs can help visualize the probability distribution of a random variable. The PDF graph shows the probability of each individual outcome, while the CDF graph shows the cumulative probability up to a specific value.