p1_martingale_report-1
.pdf
keyboard_arrow_up
School
Georgia Institute Of Technology *
*We aren’t endorsed by this school
Course
7646
Subject
Computer Science
Date
Dec 6, 2023
Type
Pages
8
Uploaded by AdmiralWaterBuffalo3874
CS 7646 Spring2023 Project 1: Martingale
Question 1
: In Experiment 1, based on the experiment results calculate and provide the
estimated probability of winning $80 within 1000 sequential bets. Thoroughly explain your
reasoning for the answer using the experiment output. Your explanation should NOT be based
on estimates from visually inspecting your plots, but from analyzing any output from your
simulation.
The probability of winning $80 within 1000 successive bets is 100%. The strategy allows us to
double our bet amount in the next bet, and the odd of won is 18/38, or 47.36% which is close to
50% winning odd, and each bet is individually independent in odd, so unlimited bet amount
will guarantee we reach the $80 winning goal within 1000 successive bets.
The mean and median of winning amount both reach to $80 before 1000 simulation successive
bets as we calculated in Figure 2 and Figure 3, it indicates that average winning amount of
betting converge to $80 before 1000 bets, so the winning amount achieve the goal within our
expectation, therefore the stability in the Monte Carlo simulation further validates the result.
Question 2
: In Experiment 1, what is the estimated expected value of winnings after 1000
sequential bets? Thoroughly explain your reasoning for the answer.
The expected value of winnings after 1000 sequential bets is $80. The mean of Monte Carlo
simulation converges to $80 before 1000 sequential bets, so the expected winning amount is $80.
The discussion in Question1 validates that the probability of winning $80 in 1000 successive
bets is 100%, so the result guarantees the mean of the event is $80.
Question 3
: In Experiment 1, do the upper standard deviation line (mean + stdev) and lower
standard deviation line (mean – stdev) reach a maximum (or minimum) value and then
stabilize? Do the standard deviation lines converge as the number of sequential bets increases?
Thoroughly explain why it does or does not.
The standard deviation upper and lower lines do not stabilize in the first 200 sequential bets in
my simulation, then they converge to $80. The variation on bets amount in every bank roll
across simulations result in un-stabilization of standard deviation in the first 200 runs, but
winning amount standard deviation upper and lower lines gradually stabilize and converge to
80 is because the $80 expected winning amount target is reached within 1000 successive bets in
every simulation.
Question 4
: In Experiment 2, based on the experiment results calculate and provide the
estimated probability of winning $80 within 1000 sequential bets. Thoroughly explain your
reasoning for the answer using the experiment output. Your explanation should NOT be based
on estimates from visually inspecting your plots, but from analyzing any output from your
simulation.
The mean of the bets in experiment 2 closes to -41.5 according to my simulation result. The
experiment 2 scenario fits in the binomial distribution because the winning amount either falls
to -$256 or goes up to $80, so assuming probability of winning amount equals to p, thus we
have: 80*p+(-256)*(1-p)=-41.5, so the probability of winning $80 within 1000 sequential bets is
0.638.
Question 5
: In Experiment 2, what is the estimated expected value of winnings after 1000
sequential bets? Thoroughly explain your reasoning for the answer.
The estimated expected value of winnings is the mean in the simulation, so it is equal to -41.5,
which can be calculated by binomial distribution mean, 80*0.638+(-256)*0.362=-41.5
Question 6
: In Experiment 2, do the upper standard deviation line (mean + stdev) and lower
standard deviation line (mean – stdev) reach a maximum (or minimum) value and then
stabilize? Do the standard deviation lines converge as the number of sequential bets increases?
Thoroughly explain why it does or does not.
The upper standard deviation line spikes as the number of bets increases, then the line stabilizes
and converges to certain level, the lower standard deviation line declines as the number of bets
increase, then the line stabilizes. Both lines reach to max and min, then stable separately. The
bank roll limit 256 and winning amount limit 80 results in the stability of upper and lower line
as the number of bets increases, so it guarantees the stability of upper bound line and lower
bound line in 1000 simulation of 1000 sequential bets in an episode.
Question 7
: What are some of the benefits of using expected values when conducting
experiments instead of simply using the result of one specific random episode?
One specific random episode cannot be generalized to all simulation results, so we use expected
values in experiment to understand the average winning amount over time in martingale
simulations, the expected values or mean can easily help us to summarize the performance of
different experiments. The expected values can represent the tendency in multiple rounds of
simulations in an experiment.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
can you help me for exercise 6 with two points
arrow_forward
An experiment with 10 participants was conducted to measure simple reaction time: the time to press a button in response to a visual stimulus (a light). This was a pilot study, so only five participants were tested. The reaction times in milliseconds for the five participants over 10 trials are shown below.
Trial
Susan
Abdul
Krisha
Sam
Sara
T1
326
311
242
270
447
T2
395
256
184
492
429
T3
383
280
432
377
452
T4
337
344
454
315
556
T5
463
345
304
368
483
T6
194
287
385
302
307
T7
303
290
225
184
442
T8
235
266
425
483
319
T9
180
134
371
269
493
T10
484
265
293
312
375
arrow_forward
Draw an eight-by-eight chessboard on a sheet of paper and attempt a Knight’s Tour by hand. Put a 1 in the starting square, a 2 in the second square, a 3 in the third, and so on. Before starting the tour, estimate how far you think you’ll get, remembering that a full tour consists of 64 moves. How far did you get? Was this close to your estimate?
arrow_forward
As we've previously seen, equations describing situations often contain uncertain parameters, that
is, parameters that aren't necessarily a single value but instead are associated with a probability
distribution function. When more than one of the variables is unknown, the outcome is difficult
to visualize. A common way to overcome this difficulty is to simulate the scenario many times
and count the number of times different ranges of outcomes occur. One such popular simulation
is called a Monte Carlo Simulation. In this problem-solving exercise you will develop a program
that will perform a Monte Carlo simulation on a simple profit function.
Consider the following total profit function:
PT=nPv
Where Pr is the total profit, n is the number of vehicles sold and P, is the profit per vehicle.
PART A
Compute 5 iterations of a Monte Carlo simulation given the following information:
n follows a uniform distribution with minimum of 1 and maximum 10
P, follows a normal distribution with a mean…
arrow_forward
Any simple work can be aided by the Spiral Model.
arrow_forward
Simulation Assignment IV
Simulate the token ring problem to obtain the average time the token goes around and it confidence
interval (i.e., going around means token starts at a station of your choice and comes back to the same
station).
PASTE TEXT CODE HERE
PASTE THE PRINTOUT OF A PART OF YOUR EVENT TABLE (15 TO 20 EVENTS) IN HERE (IN TEXT OR IMAGE
FILE)
WHAT IS THE AVERAGE TIME TOKEN GOES AROUND AND ITS CONFIDENCE INTERVAL.
arrow_forward
Need help with checkpoint b while using this code
arrow_forward
Theoretical Overview
Suppose we have a set of data consisting of ordered pairs and we suspect the x and y coordinates are related. It is natural to try to find the best line that fits the data points. If we can find this line, then we can use it to make all sorts of other predictions. In this project, we're going to use several functions to find this line using a technique called least squares regression. The result will be what we call the least squares regression line (or LSRL for short).
In order to do this, you'll need to program a statistical computation called the correlation coefficient, denoted by r in statistical symbols:
NOTE: Equation is written assuming you start at the value 1. Lists start at index 0.
Once you have the correlation coefficient, you use it along with the sample means and sample standard deviations of the x and y-coordinates to compute the slope and y-intercept of your regression line via these formulas:
Tasks:
In this project, you must read…
arrow_forward
Q1. Let’s play a dice game with a pair of dice following these rules:1. At the beginning, you throw a pair of dice. If the two numbers add up to 5, 6, 7, 8, or 9, thegame immediately stops.2. If your first throw does not meet those 5 totals, you would continue until you get either 11 or12.Get 1000 simulations of this paired dice game. What is the average number of dice throw per game?You can use the sample() function to simulate the dice.
arrow_forward
Problem 1.
You are playing a version of the roulette game, where the pockets are
from 0 to 10and even numbers are red and odd numbers are black (0 is
green). You spin 3 times and add up the values you see. What is the
probability th at you get a total of 17 given on the first spin you
spin a 2? What about a 3?
Solve by simulation and analytically.
arrow_forward
There is a penalty kick scenario: the striker can shoot left, right or middle. Similarly, the goalkeeper can jump to the left, right or stay in the middle. Assume the striker never misses the goal when shooting to the center or to the left corner but misses 20% of the shots to the right corner. Further assume the goalkeeper can prevent a goal in 50% when he jumps to the correct corner, or 100% of the shots in the middle if he stays in the middle.
1) write down the bimatrix
2) for the striker, "right" is not a best response to any pure strategy. Find a mixed strategy such that "right" is the best response to sigma2.
arrow_forward
Suppose you follow a certain stock in the stock exchange and record the daily values of the stock you follow for a certain period (Let's assume that the values recorded for each day represent the actual price of the stock on that day). After the period is over, you want to make a simulation using the recorded values and determine the correct buying and selling days in order to take the most profitable position for that stock during this period. Naturally, in order to take the most profitable position, the purchase and sale days of the stock should be determined in such a way that the prices at the time of sale and purchase should be at the highest value compared to other alternatives, that is, we want to maximize the price difference between the two points.
As an example, suppose a 4-day series is taken and the recorded price series is as follows:
Day 1: $ 9Day 2: $ 1Day 3: $ 54th day: $ 4
In this case, if the purchase day is the 2nd day and the selling day is the 3rd, this…
arrow_forward
The bean machine, also known as a quincunx or the Galton box, is a device for statistics experiments named after English scientist Sir Francis Galton. It consists of an upright board with evenly spaced nails (or pegs) in a triangular pattern, as shown in Figure 10.15. Balls are dropped from the opening of the board. Every time a ball hits a nail, it has a 50% chance of falling to the left or to the right. The piles of balls are accumulated in the slots at the bottom of the board.
Write a program that simulates the bean machine. Your program shouldprompt the user to enter the number of the balls and the number of the slots in the machine. Simulate the falling of each ball by printing its path. For example, the path for the ball in Figure 10.15b is LLRRLLR and the path for the ball in Figure 10.15c is RLRRLRR. Display the final buildup of the balls in the slots in a histogram.
arrow_forward
Correct answer will be upvoted else Multiple Downvoted. Don't submit random answer. Computer science.
You have n particular focuses (x1,y1),… ,(xn,yn) on the plane and a non-negative integer boundary k. Each point is a tiny steel ball and k is the draw in force of a ball when it's charged. The draw in power is something very similar for all balls.
In one activity, you can choose a ball I to charge it. When charged, all balls with Manhattan distance all things considered k from ball I move to the situation of ball I. Many balls may have a similar facilitate after an activity.
All the more officially, for all balls j with the end goal that |xi−xj|+|yi−yj|≤k, we dole out xj:=xi and yj:=yi.
An illustration of an activity. Subsequent to charging the ball in the middle, two different balls move to its position. On the right side, the red dab in the middle is the normal situation of those balls.
Your errand is to observe the base number of activities to move all balls to a similar…
arrow_forward
How does sleep deprivation affect your ability to drive? A recent study measured the effects on 19 professional drivers. Each driver participated in two experimental sessions: one after normal sleep and one after 27 hours of total sleep deprivation. The treatments were assigned in random order. In each session, the performance was measured on a variety of tasks including a driving simulation.
Use key terms from this module to describe the design of this experiment.PS: The other Picture are the choices to every prompts
arrow_forward
Size of sample space
A six-sided dice is rolled, a five-sided dice is rolled and a three-sided dice is rolled.
Considering this as a probability experiment, what is the size of the sample space?
An Event
In the context of the probability experiment just described (a 6-sided, a 5-sided, and a 3-sided dice thrown): Consider the event in which two face-
up numbers on the three dice add to 10.
What is the size of this set?
Save
Reset
arrow_forward
Abstract: the main purpose of this experiment is build real time system using PPI
8255 to control devices connected to.
Problem description: assume that there are two devices are connected to port A and
two sensors are connected to port B of PPI 8255. They work according to the
following table
Devices (DID2)
01
10
Sensors (S1S2)
00
01
10
11
11
00
Write a program to control these two devices according to the values of sensors.
Each group should submit a zip file which contains the following files
Code file: (assembly language code)
- Simulation file
Report (pdf file) (details of every single step in the code, also what have you
learned from this experiment)
arrow_forward
Even the tiniest activities may be made easier using the Spiral Model.
arrow_forward
Assume a very good NBA team has a 70% chance of winning in each game it plays. Use simulation to answer these questions, where each iteration of the simulation generates the outcomes of all 82 games. Use simulation with 10,000 iterations to answer the questions.
For part a, write your numerical answer with no decimal or commas (e.g., if your computed answer is 101,021.128, write your answer as 101021). For part b, write your probability answer to two decimal places with a leading 0 (e.g., write a probability of 90.02% as 0.90). a. During an 82-game season what is the average length of the team's longest winning streak? The average length of the winning streak is .
b. What is the probability that the team has a winning streak of at least 16 games? The probability is
arrow_forward
18
The strategy that is used to allocate the smallest hole that is big enough is called:
None of the answers
Worst fit
First fit
Best fit
arrow_forward
In planet Z, there have been two new discoveries of Condition A and Condition B in plants. You have been tasked with creating a system which will detect the chances of development of Conditions A and B in plants. The conditions depend on the following factors:
Inputs (Symptoms) :
W: Low Temperature. (W=1 if the temperature is Low, W=0 otherwise)
X: Oxygen Level (X=1 if oxygen level is normal, X=0 otherwise)
Y: Presence of UV Light (Y=1 if UV light is present, Y=0 otherwise)
Z :Humidity (Z= 1 if the humidity is high, Z=0 otherwise)
Outputs: A : Condition A
B : Condition B
A plant will develop Condition A if presence of UV Light is accompanied by
i) high temperature with normal oxygen level
or
ii) low humidity.
If UV Light is absent then the plant will develop Condition A if there is
i) an abnormal level of oxygen
or
ii) high humidity with low temperature
If there is high temperature or abnormal oxygen level with…
arrow_forward
In a classroom election, two presidential candidates, namely, Lisa and Teddy, both garnered the same number of total votes. As such, they decided to play a custom dice game to determine the winner of the election. In this game, a player needs to roll a pair of dice. Teddy will win the game if the sum is odd whereas Lisa will be declared winner if the sum results to even. However, prior to the start of the game, Teddy complained that the custom dice game is biased because according to him, the probability of an even result is 6/11, and for odd - only 5/11. Verify Teddy's claim and evaluate the fairness of the game.
COMPLETE SOLUTION
arrow_forward
The Monte Carlo method is used in modeling a wide-range of physical systems at the forefront of scientific research today. Monte Carlo
simulations are statistical models based on a series of random numbers. Let's consider the problem of estimating Pi by utilizing the Monte
Carlo method.
Suppose you have a circle inscribed in a square (as in the figure). The experiment simply consists of throwing darts on this figure
completely at random (meaning that every point on the dartboard has an equal chance of being hit by the dart). How can we use this
experiment to estimate Pi? The answer lies in discovering the relationship between the geometry of the figure and the statistical outcome
of throwing the darts. Let's first look at the geometry of the figure.
Let's assume the radius of the circle is R, then the Area of the circle = Pi * R^2 and the Area of the square = 4 * R^2. Now if we divide the
area of the circle by the area of the square we get Pi / 4.
But, how do we estimate Pi by…
arrow_forward
How to sovle checkpoint b using while using the python code i give
arrow_forward
Three prisoners have been sentenced to long terms in prison, but due to over crowed conditions, one prisoner must be released.
The warden devises a scheme to determine which prisoner is to be released. He tells the prisoners that he will blindfold them and then paint a red dot or blue dot on each forehead. After he paints the dots, he will remove the blindfolds, and a prisoner should raise his hand if he sees at least one red dot on the other two prisoners. The first prisoner to identify the color of the dot on his own forehead will be release. Of course, the prisoners agree to this. (What do they have to lose?)
The warden blindfolds the prisoners, as promised, and then paints a red dot on the foreheads of all three prisoners. He removes the blindfolds and, since each prisoner sees a red dot (in fact two red dots), each prisoner raises his hand. Some time passes when one of the prisoners exclaims, "I know what color my dot is! It's red!" This prisoner is then released.
Your problem…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Related Questions
- can you help me for exercise 6 with two pointsarrow_forwardAn experiment with 10 participants was conducted to measure simple reaction time: the time to press a button in response to a visual stimulus (a light). This was a pilot study, so only five participants were tested. The reaction times in milliseconds for the five participants over 10 trials are shown below. Trial Susan Abdul Krisha Sam Sara T1 326 311 242 270 447 T2 395 256 184 492 429 T3 383 280 432 377 452 T4 337 344 454 315 556 T5 463 345 304 368 483 T6 194 287 385 302 307 T7 303 290 225 184 442 T8 235 266 425 483 319 T9 180 134 371 269 493 T10 484 265 293 312 375arrow_forwardDraw an eight-by-eight chessboard on a sheet of paper and attempt a Knight’s Tour by hand. Put a 1 in the starting square, a 2 in the second square, a 3 in the third, and so on. Before starting the tour, estimate how far you think you’ll get, remembering that a full tour consists of 64 moves. How far did you get? Was this close to your estimate?arrow_forward
- As we've previously seen, equations describing situations often contain uncertain parameters, that is, parameters that aren't necessarily a single value but instead are associated with a probability distribution function. When more than one of the variables is unknown, the outcome is difficult to visualize. A common way to overcome this difficulty is to simulate the scenario many times and count the number of times different ranges of outcomes occur. One such popular simulation is called a Monte Carlo Simulation. In this problem-solving exercise you will develop a program that will perform a Monte Carlo simulation on a simple profit function. Consider the following total profit function: PT=nPv Where Pr is the total profit, n is the number of vehicles sold and P, is the profit per vehicle. PART A Compute 5 iterations of a Monte Carlo simulation given the following information: n follows a uniform distribution with minimum of 1 and maximum 10 P, follows a normal distribution with a mean…arrow_forwardAny simple work can be aided by the Spiral Model.arrow_forwardSimulation Assignment IV Simulate the token ring problem to obtain the average time the token goes around and it confidence interval (i.e., going around means token starts at a station of your choice and comes back to the same station). PASTE TEXT CODE HERE PASTE THE PRINTOUT OF A PART OF YOUR EVENT TABLE (15 TO 20 EVENTS) IN HERE (IN TEXT OR IMAGE FILE) WHAT IS THE AVERAGE TIME TOKEN GOES AROUND AND ITS CONFIDENCE INTERVAL.arrow_forward
- Need help with checkpoint b while using this codearrow_forwardTheoretical Overview Suppose we have a set of data consisting of ordered pairs and we suspect the x and y coordinates are related. It is natural to try to find the best line that fits the data points. If we can find this line, then we can use it to make all sorts of other predictions. In this project, we're going to use several functions to find this line using a technique called least squares regression. The result will be what we call the least squares regression line (or LSRL for short). In order to do this, you'll need to program a statistical computation called the correlation coefficient, denoted by r in statistical symbols: NOTE: Equation is written assuming you start at the value 1. Lists start at index 0. Once you have the correlation coefficient, you use it along with the sample means and sample standard deviations of the x and y-coordinates to compute the slope and y-intercept of your regression line via these formulas: Tasks: In this project, you must read…arrow_forwardQ1. Let’s play a dice game with a pair of dice following these rules:1. At the beginning, you throw a pair of dice. If the two numbers add up to 5, 6, 7, 8, or 9, thegame immediately stops.2. If your first throw does not meet those 5 totals, you would continue until you get either 11 or12.Get 1000 simulations of this paired dice game. What is the average number of dice throw per game?You can use the sample() function to simulate the dice.arrow_forward
- Problem 1. You are playing a version of the roulette game, where the pockets are from 0 to 10and even numbers are red and odd numbers are black (0 is green). You spin 3 times and add up the values you see. What is the probability th at you get a total of 17 given on the first spin you spin a 2? What about a 3? Solve by simulation and analytically.arrow_forwardThere is a penalty kick scenario: the striker can shoot left, right or middle. Similarly, the goalkeeper can jump to the left, right or stay in the middle. Assume the striker never misses the goal when shooting to the center or to the left corner but misses 20% of the shots to the right corner. Further assume the goalkeeper can prevent a goal in 50% when he jumps to the correct corner, or 100% of the shots in the middle if he stays in the middle. 1) write down the bimatrix 2) for the striker, "right" is not a best response to any pure strategy. Find a mixed strategy such that "right" is the best response to sigma2.arrow_forwardSuppose you follow a certain stock in the stock exchange and record the daily values of the stock you follow for a certain period (Let's assume that the values recorded for each day represent the actual price of the stock on that day). After the period is over, you want to make a simulation using the recorded values and determine the correct buying and selling days in order to take the most profitable position for that stock during this period. Naturally, in order to take the most profitable position, the purchase and sale days of the stock should be determined in such a way that the prices at the time of sale and purchase should be at the highest value compared to other alternatives, that is, we want to maximize the price difference between the two points. As an example, suppose a 4-day series is taken and the recorded price series is as follows: Day 1: $ 9Day 2: $ 1Day 3: $ 54th day: $ 4 In this case, if the purchase day is the 2nd day and the selling day is the 3rd, this…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole