### Understanding Random Variables with a Basketball Stats Example

#### Introduction to Random Variables

A random variable is a fundamental concept in probability and statistics. It essentially represents a set of possible values from a random experiment. The key points to understand about random variables are as follows:

**Definition**: A random variable is not a variable in the traditional mathematical sense (a letter x or a letter y). Instead, it’s a function that assigns a real number to each outcome of a random process.**Types**: There are two main types:

**Discrete Random Variables**: These take on a countable number of distinct values. Think of rolling a dice, where the outcomes are finite and distinct (1, 2, 3, 4, 5, 6).**Continuous Random Variables**: These can take on any value within a range. An example is the measurement of temperature. It can be 98.1 degrees, or 98.12 degrees, or 98.1234914881441 degrees. On the contrary, you can’t roll a 6 sided die in the example above and get 4.1 as an outcome.

For the purpose of this lesson, we’ll focus on Discrete Random Variables, as they are more intuitive and relevant for sports betting, and also don’t require any knowledge of Calculus.

Here are some key properties of discrete random variables, in the context of NFL statistics:

**Countability**: A discrete random variable has a countable number of possible values.

- Example: The number of touchdowns scored by a player in a game (0, 1, 2, …).

**Probability Mass Function (PMF)**: This function gives the probability that a discrete random variable is exactly equal to some value.

- Example: The probability of a quarterback throwing exactly 3 touchdowns in a game.

**Finite or Infinite Values**: Discrete random variables can have either a finite or an infinite number of values, but each value must be countable.

- Example: The number of passing yards in a game is finite (bounded by the length of the game and physical limits).

**Summation of Probabilities**: The sum of the probabilities of all possible values of the discrete random variable equals 1.

- Example: The probabilities of a team scoring 0, 1, 2, … points in a game add up to 1.

**Expectation (Mean)**: The expected value or mean of a discrete random variable is the average value it would take over an infinite number of trials.

- Example: The average number of interceptions per game by a defensive player.

**Variance and Standard Deviation**: These measure the spread of the random variable’s possible values. Variance is the average of the squared differences from the mean, and the standard deviation is the square root of the variance.

- Example: The variability in the number of field goals made by a kicker across different games.

**Independence (sometimes applicable)**: In some contexts, the occurrences of different values of the variable are independent of each other.

- Example: The number of touchdowns scored by a player in one game is generally independent of the number they score in another game.

In the context of sports statistics, these properties help in understanding and predicting various aspects of the game, such as player performance, team scoring patterns, and the likelihood of certain events occurring during a game.