Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 9. Simulate the net gain in 200 one-dollar bets on the 5-6 split, repeating the process 10,000 times and saving your gains in
Question 9. Simulate the net gain in 200 one-dollar bets on the 5-6 split, repeating the process 10,000 times and saving your gains in the array simulated_gains_split . (5 points) Hint: Your code in Questions 4 and 5 may be helpful here! In [88]: num_bets = 10000 repetitions = 200 all_gains_split = make_array() for i in np.arange (num_bets): outcomes = np.random.choice (wheel [ 'Pocket'], repetitions) split_wins outcomes == '5-6' net_gain = sum(split_wins) - repetitions all_gains_split = np.append(all_gains_split, net_gain) gains = Table().with_columns ('Net Gain on Split', all_gains_split) gains.hist (bins=np.arange (-200, 150, 20)) 5 Percent per unit N m -200 -150 -100 -50 0 Question 10. Look carefully at the visualization above, and assign histogram_statements to an array of the numbers of each statement below that can be correctly inferred from the overlaid histogram. (2 points) In [116]: histogram_statements = 1. If you bet one dollar 200 times on a split, your chance of losing money is more than 50%. 2. If you bet one dollar 200 times in roulette, your chance of making more than 50 dollars is greater if you bet on a split each time than if you bet on red each time. In [90]: grader. check("q1_10") Out [90]: q1_10 results: Net Gain on Split 3. If you bet one dollar 200 times in roulette, your chance of losing more than 50 dollars is greater if you bet on a split each time than if you bet on red each time. Hint: We've already seen one of these statements in a prior question. q1_101 result: 50 X Test case failed Trying: 100 150 import numpy as np
Step by Step Solution
★★★★★
3.28 Rating (157 Votes )
There are 3 Steps involved in it
Step: 1
To simulate the net gain in 200 onedollar bets on the 56 split repeating the process 10000 times we ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started