concept biased deck in category data
appears as: Biased Deck, biased deck

This is an excerpt from Manning's book Data Science Bookcamp: Five Python Projects.
Suppose you’re shown a biased deck of cards. The deck holds 52 cards total. Each card is either red or black. How many red cards are present in the deck? You can answer this by counting all the red cards one-by-one, but that would be too easy. Lets add a constraint to make the problem more interesting. You are only allowed to see the first card in the deck! None of the other cards are accessible. If you wish to see a new card, you must first reshuffle the deck. You’re permitted to reshuffle as many times as you like, and to view the top card after each shuffle.
1 Computing Probabilities Using Python 1.1 Sample Space Analysis: An Equation-Free Approach for Measuring Uncertainty in Outcomes 1.1.1 Analyzing a Biased Coin 1.2 Computing Non-Trivial Probabilities 1.2.1 Problem 1: Analyzing a Family with 4 Children 1.2.2 Problem 2: Analyzing Multiple Dice Rolls 1.2.3 Problem 3: Computing Dice-Roll Probabilities using Weighted Sample Spaces 1.3 Computing Probabilities Over Interval Ranges 1.3.1 Evaluating Extremes Using Interval Analysis 1.4 Summary 2 Plotting Probabilities Using Matplotlib 2.1 Basic Matplotlib Plots 2.2 Plotting Coin-Flip Probabilities 2.2.1 Comparing Multiple Coin-Flip Probability Distributions 2.3 Summary 3 Running Random Simulations in NumPy 3.1 Simulating Random Coin-Flips and Dice-Rolls Using NumPy 3.1.1 Analyzing Biased Coin-Flips 3.2 Computing Confidence Intervals Using Histograms and NumPy Arrays 3.2.1 Binning Similar Points in Histogram Plots 3.2.2 Deriving Probabilities from Histograms 3.2.3 Shrinking the Range of a High Confidence Interval 3.2.4 Computing Histograms in NumPy 3.3 Leveraging Confidence Intervals to Analyze a Biased Deck of Cards 3.4 Using Permutations to Shuffle Cards 3.5 Summary