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 alice program that minimally does move the cars

Create an Alice program that minimally does Move the cars to either side of the screen, at the same Z-axis position -- one on the far left side of the screen facing right, and one on the far right side of the screen facing left

  Differences between a flat file and a relational database

What are some of the key differences between a flat file and a relational database?

  Design program to ecode message using caesar cypher

Design a program which decodes messages. Messages will be encoded using Caesar cypher, with each letter being decoded by replacing it with previous letter in alphabet.

  Draw a erd model a manufacturing company

Draw a ERD model A manufacturing company has several assembly plants in different cities. Each plant produces one product which requires certain parts in its assembly.

  Program calculate average number of days employee are absent

Write a program that calculates the average number of days a company's employees are absent. The program should have the following functions: a function called main that asks the user for the number of employees.

  Write a program that simulates the dialing of a phone number

In this lab you will write a program that simulates the dialing of a phone number. The phone number may have either digits, letters, or both. (See sample output below) Here are the letters associated with each digit.

  Functioning program that addresses behavioural design

ITECH2100 / ITECH6100. Task-2: Code a functioning program that addresses the behavioural and additional design requirements Write the classes that you have determined are needed to make a functioning program

  Sketch program flowchart for program to compute average

Sketch a program flowchart for a program that will compute the average of five grades. Input five grades and output the aveage.

  Implement a state-space search

You will implement a state-space search that will find a solution to the sixteenpuzzle. For this program, in addition to the state-space search control, you will need to implement at least two other classes

  Write program for grocery that reads products data

Write a program for a grocery that reads products data and determine and display the product that has the highest price and the average price.

  Create j2ee application

Business-tier components run on the J2EE server. 1. Create session bean to represent business logic - CalculatorClient-tier components run on the client machine. 2. Create an application client to access the Calculator

  Write program which bounces blue ball inside jpanel

Write a program which bounces blue ball inside a JPanel. The ball must begin moving with a mousePressed event. When the ball hits the edge of the JPanel.

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