Problem 8. 20 pts] I have a special coin with "memory" that I will be tossing...
Using c++ Write a function named coinToss that simulates tossing a coin. When you call the function it should generate and return a random number in the range 1 through 2. 1 represents heads and 2 represents tails. Exercise 1 (40 points) Write a function named coinToss that simulates tossing a coin. When you call the function it should generate and return a random number in the range 1 through 2.1 represents heads and 2 represents tails Use the function...
A box contains five coins. For each coin there is a different probability that a head will be obtained when the coin is tossed. (Some of the coins are not fair coins!) Let pi denote the probability of a head when the i th coin is tossed (i = 1, . . . , 5), and suppose that p1 = 0, p2 =1/4, p3 =1/2, p4 =3/4, p5 =1. The experiment we are interested in consists in selecting at random...
Problem 2: Tails and (Heads or Tails?) Alice and Bob play a coin-tossing game. A fair coin (that is a coin with equal probability of 1. The coin lands 'tails-tails' (that is, a tails is immediately followed by a tails) for the first 2. The coin lands 'tails-heads (that is, a tails is immediately followed by a heads) for the landing heads and tails) is tossed repeatedly until one of the following happens time. In this case Alice wins. first...
Tossing an unfair coin with P(H) = 0.6 and P(T) = 0.4. The coin is tossed 10 times (each toss is independent from others) and in any turn it shows heads, it is tossed again. We want to count the cases where the coin is tossed twice and the second toss, too, is head. For example, H T T T T T T T H T H T In this case, the count will be 1. Only the first turn...
3. Suppose my friend and I are tossing a biased coin (the chance of the coin landing heads is 0.48). I get one dollar each time the coin lands heads, and I have to pay one dollar to my friend each time it lands tails. I will stop playing if my net gain is three dollars. (a)What is the chance that I will stop after exactly three tosses? (b) What is the chance that I will stop after exactly four...
Write a C++ program that simulates coin tossing. For each toss of the coin the program should print Heads or Tails. The program should toss a coin 100 times. Count the number of times each side of the coin appears and print the results at the end of the 100 tosses. The program should have the following functions as a minimum: void toss() - called from main() and will randomly toss the coin and set a variable equal to the...
# JAVA Problem Toss Simulator Create a coin toss simulation program. The simulation program should toss coin randomly and track the count of heads or tails. You need to write a program that can perform following operations: a. Toss a coin randomly. b. Track the count of heads or tails. c. Display the results. Design and Test Let's decide what classes, methods and variables will be required in this task and their significance: Write a class called Coin. The Coin...
35. You and I play the following game: I toss a coin repeatedly. The coin is unfair and P(H) = p. The game ends the first time that two consecutive heads (HH) or two consec- utive tails (TT) are observed. I win if (HH) is observed and you win if (TT) is observed. Given that I won the game, find the probability that the first coin toss resulted in heads?
- [10+10]A defective coin minting machine produces coins whose probability of heads is a continuous) random variable P with pdf f(p) = pep ,0<p<1 A coin produced by this machine is selected and tossed. a) Find the probability that the coin toss results in heads. ) Given that the coin toss resulted in heads, find the conditional pdf of P.
This is discrete mathematics If you do it right, I must give praise. You must use probability space is a triple relative acknowledge. S: is a sample sapce E=p(s) is the set of all events P: E-->R is a function. The important thing that I need to say three times: If you don't know how to do it, please don't do it. don't copy others, especially for question (a), give sample space, probability measure The important thing that I need...