Assignment #3 1. Some dice are rolled. You get $1 for each 6 that shows up; but, if there are no 6's you lose $1 for each die that was rolled. What number of dice makes the game most fair? Most unfavorable? Most favorable? 2. There are three coins in a bag; one has two heads, one has two tails, and one is a fair coin. A coin is chosen randomly from the bag and tossed. A player sees the top of the coin and makes a bet on what is on the other side of the coin. What should the guess be? How much should the bet be? The second question is the more difficult; consider it a long term project until you have more experience with probability theory. Write ISETL funcs to simulate the game and betting strategies. Use the funcs provided in the file COINBAG.!I 3. Write an ISETL func to return the expected tosses of a fair coin until n consecutive heads appears. Justify the correctness of your answer. 4. Here is an algorithm that was suggested for getting a random subset of a set. If you collect $1 for each use of the random func, what is the fair price to pay to use the RandSet func? The answer will depend on the population size and sampleSize. Write an ISETL func to give the correct answer. RandSet := func(sampleSize,population); $ requires: population is a set;sampleSize a positive integer $ effects : returns a subset of sampleSize from population local sample; sample := {}; while #sample /= sampleSize do sample := sample with random(population); end; return sample; end; 5. Write ISETL funcs to return the probabilities that exactly n cards are drawn, (1) with and (2) without replacement, from a deck before the first ace is drawn. Use the result (2) to give an alternate method of solving problem 5 of Assignment 1 about the expected number of draws.