I need to know if there is a python package that lets me easily calculate the expected value of a game. I will be needing to use a large number of dice rolls. I know I will need at least 32 dice rolls, but probably a lot more.
For calculating the expected value of a game that involves a large number of dice rolls, you may want to consider using the NumPy package in Python. NumPy is a numerical computing library that provides support for large arrays and matrices of numeric data.

With NumPy, you can easily generate arrays of random numbers that represent the outcomes of dice rolls. You can then use these arrays to calculate the expected value of the game.

For example, if you have a game where you roll a six-sided die and receive a certain reward for each outcome, you can use NumPy to simulate a large number of dice rolls and calculate the average reward. Here's a code snippet that demonstrates this:
```python
import numpy as np

# Define the reward for each outcome
rewards = np.array([2, 3, 4, 5, 6, 7])

# Simulate 32 dice rolls
dice_rolls = np.random.randint(1, 7, size=(32,))

# Calculate the expected value
expected_value = np.mean(rewards[dice_rolls - 1])
```

Note that in this example, the dice_rolls array is generated using the `np.random.randint` function, which generates random integers within a specified range. The rewards array is indexed using the dice_rolls array, so that each reward is selected based on the outcome of the corresponding dice roll. The expected value is then calculated as the mean of all rewards.

With NumPy, you can easily scale up this example to handle a large number of dice rolls and more complex games. It is a powerful tool for performing numerical computations in Python.
Are there any other NumPy functions would help in comparing the actual outcomes to the expected outcomes?
Could you perhaps clarify what you mean by actual vs expected outcomes?
With actual outcome, do you mean the theoretical average for an infinite sample size?