Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/* IN JAVA --Write a program that determines the probability of tossing a coin 100 times and getting exactly 0, 1, 2, 3, etc. heads.

/*IN JAVA --Write a program that determines the probability of tossing a coin 100 times and getting exactly 0, 1, 2, 3, etc. heads. This is the binomial probability distribution. Store the probability in an array. You could get 0 heads or 100 heads or anything in between. The probability of a success is .5, and also the probability of a failure is .5. Print out in table form, column 1=r; goes 0 to 100, and then column 2, the probability of r. Use 4 decimal places for the probability. You know if you get the correct answers because The sum of all the probabilities is 1.0, and all probabilities are in the range of 0 to 1 inclusive.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions