Glossary

`(simulated_margins > 0).mean()`

This is a vectorized computation that converts the array of simulated margins to a Boolean array (True where Garza wins, False where Whitfield wins) and takes the mean. Since True = 1 and False = 0, the mean of a Boolean array is the proportion of True values — which is the win probability. This is

Learn More

Related Terms