What is the probability that you can toss some number n


Computer Science Assignmnet

use this program

https://snap.berkeley.edu/snapsource/snap.html#

The assignment is to create a block to simulate coin tosses in snap. The block should take in 2 parameters, the number of coin tosses per trial and the number of trials. Some example values of this might be 3 as the number of coin tosses per trial and 1000 for the number of trials. The lecture slides given on Friday show the pseudocode for this.

What is the probability that you can toss some number, n, heads in a row?

The idea here is to calculate the probability of trials that had all heads, such that a trial constitutes a set number of coin tosses. So if your number of tosses in a trial is 2, and the number of trials is 1000, then the probability is .25, and your program should display a number close to that (it isn't always exact since the program itself deals with statistics, not probability...in other words, if you were to do these coin tosses yourself, it's not always perfect probability). This says that out of 1000 trials that have 2 coin tosses per trial, 25% of those trials came up with two heads in a row. For 3 tosses per trial at 1000 trials, the probability is 12.5%, and your program should display a number close to that. For 1 toss per trial at 1000 trials, the probability is 50%.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: What is the probability that you can toss some number n
Reference No:- TGS01726895

Expected delivery within 24 Hours