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

  Create an event handler for the click

Create an event handler for the Click event of the Exit button that closes the form

  Write a program that will operate the alarm simulation

Write a program that will operate the Alarm Simulation, using the following inputs and outputs and whatever Timers and Flags are required.

  Create class using static variable to store annual interest

Create class SavingAccount. Use a static variable annualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsBalance indicating the amount.

  Program that will allow a user to input list of their family

Problem Statement: Design a program that will allow a user to Input a list of their family members along with their age and state where they reside. Determine and output the average age of their family and output the names of anyone who lives in T..

  Implement sumpairs and sumof

Using SML writes a version of sumPairs that sums each component of the pairs separately, returning a pair consisting of the sumof the first components and the sum of the second components

  Threads belonging to same process affected by page fault

Other user user threads belonging to the same process also be affected by the page fault - that is would they also have to wait for the faulting page to be brought into memory? Explain.

  Compute the area of a circle

In MIPS assembly, write an assembly language program which asks a user for a decimal number, converts it to hex, prints the result.

  Create xml document to mark nutrition facts for cookies

Create an XML document that marks up the nutrition facts for a package of Grandma White's cookies. A package of cookies has a serving size of 1 package and the following nutritional value per serving.

  Methods to declare and initialize one dimensional arraay

What is an array? Show different methods to declare and initialize one dimensional array. Draw how an integer array of 6 elements having base address 5001 is stored in memory.

  Write function concatenation of two strings as its input

Assume f is function which returns result of reversing string of symbols given as its input, and g is function which returns concatenation of two strings given as its input.

  Program to overload the addition assignment operator

Overload the addition assignment operator (+=), the subtraction assignment operator (-=), and the multiplication assignment operator (*=).

  Nested if functions along with vlookup function

The Vlookup function returns a #n/a! error if no lookup value is supplied, and various other errors whne invalid keys are entered. Use a combination of three levels of nested if functions, and other functions to avoid these problems.

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