What is the probability that you can toss some number

Assignment Help Programming Languages
Reference no: EM131324244

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%.

Reference no: EM131324244

Questions Cloud

When an investor is long the stock and short the call : The Black-Scholes-Merton option pricing model assumes the stock price changes are lognormally distributed.- Show graphically how this distribution changes when an investor is long the stock and short the call.
How do we connect to other creatures : Elisabeth Tova Bailey in The Sound of a Wild Snail Eating raises important questions about our relationship with the natural world. How do we connect to other creatures? Why is this important? Other writers we've discussed have looked at human act..
Under what circumstances will the option be exercised : An investor buys a European put on a share for $3. The stock price is $42 and the strike price is $40. Under what circumstances does the investor make a profit? Under what circumstances will the option be exercised? Draw a diagram showing the variati..
Define space complexity and time complexity : Define Space Complexity and time complexity. Give reasons for measuring the space and time complexity. Discuss trade-off between time and space complexity
What is the probability that you can toss some number : 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.
What goal do the paris agreements set for temperature : What goal do the Paris agreements set for the global temperature? According to the sources in the article, how likely is it that we'll achieve this goal? Why
The price-quality and service compare at different stores : While evaluating alternatives, all of the following are appropriate questions you could ask before making a major purchase except. Is it possible to delay the purchase or to do without the item?  Should I pay for the item with cash or buy it on credi..
Explain how you would create a synthetic stock position : Explain how you would create a synthetic stock position and identify the cost. Suppose you observe a $100 stock price, identify any arbitrage opportunities.
Write a cpp program that will declare a vector of integers : CPSC P#9- Write a complete C++ program that will: Declare a vector of integers with no specified size. Use a pointer to dynamically allocate an array of 10 integers Inside a loop:

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd