CS1802 Week 9: Probability, Expectation, Entropy

Similar documents
Math 1313 Section 6.2 Definition of Probability

Section 6.1 #16. Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

Probability MAT230. Fall Discrete Mathematics. MAT230 (Discrete Math) Probability Fall / 37

1. A factory makes calculators. Over a long period, 2 % of them are found to be faulty. A random sample of 100 calculators is tested.

Presentation by Toy Designers: Max Ashley

Name. Is the game fair or not? Prove your answer with math. If the game is fair, play it 36 times and record the results.

CSC/MTH 231 Discrete Structures II Spring, Homework 5

, x {1, 2, k}, where k > 0. (a) Write down P(X = 2). (1) (b) Show that k = 3. (4) Find E(X). (2) (Total 7 marks)

Lenarz Math 102 Practice Exam # 3 Name: 1. A 10-sided die is rolled 100 times with the following results:

Materials: Game board, dice (preferable one 10 sided die), 2 sets of colored game board markers.

Probability. March 06, J. Boulton MDM 4U1. P(A) = n(a) n(s) Introductory Probability

Independent Events B R Y

Midterm 2 Practice Problems

TEST A CHAPTER 11, PROBABILITY

If event A is more likely than event B, then the probability of event A is higher than the probability of event B.

4.3 Rules of Probability

4.1 Sample Spaces and Events

The Teachers Circle Mar. 20, 2012 HOW TO GAMBLE IF YOU MUST (I ll bet you $5 that if you give me $10, I ll give you $20.)

Junior Circle Meeting 5 Probability. May 2, ii. In an actual experiment, can one get a different number of heads when flipping a coin 100 times?

Bouncy Dice Explosion

The topic for the third and final major portion of the course is Probability. We will aim to make sense of statements such as the following:

Exam III Review Problems

Basic Probability Ideas. Experiment - a situation involving chance or probability that leads to results called outcomes.

COMPOUND EVENTS. Judo Math Inc.

PRE TEST. Math in a Cultural Context*

Lesson 11.3 Independent Events

Intermediate Math Circles November 1, 2017 Probability I

Mathematical Foundations HW 5 By 11:59pm, 12 Dec, 2015

Tail. Tail. Head. Tail. Head. Head. Tree diagrams (foundation) 2 nd throw. 1 st throw. P (tail and tail) = P (head and tail) or a tail.

EECS 203 Spring 2016 Lecture 15 Page 1 of 6

6.041/6.431 Spring 2009 Quiz 1 Wednesday, March 11, 7:30-9:30 PM.

Instructions: Choose the best answer and shade in the corresponding letter on the answer sheet provided. Be sure to include your name and student ID.

Chapter 8: Probability: The Mathematics of Chance

1. An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?

Probability of Independent and Dependent Events. CCM2 Unit 6: Probability

S = {(1, 1), (1, 2),, (6, 6)}

Counting and Probability

Math 106 Lecture 3 Probability - Basic Terms Combinatorics and Probability - 1 Odds, Payoffs Rolling a die (virtually)

Dependence. Math Circle. October 15, 2016

1. For which of the following sets does the mean equal the median?

Bouncy Dice Explosion

Bellwork Write each fraction as a percent Evaluate P P C C 6

Section 7.1 Experiments, Sample Spaces, and Events

Discrete probability and the laws of chance

Mutually Exclusive Events Algebra 1

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following:

PROBABILITY M.K. HOME TUITION. Mathematics Revision Guides. Level: GCSE Foundation Tier

SECONDARY 2 Honors ~ Lesson 9.2 Worksheet Intro to Probability

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

Grade 8 Math Assignment: Probability

EE 126 Fall 2006 Midterm #1 Thursday October 6, 7 8:30pm DO NOT TURN THIS PAGE OVER UNTIL YOU ARE TOLD TO DO SO

Unit 6: What Do You Expect? Investigation 2: Experimental and Theoretical Probability

Probability Rules. 2) The probability, P, of any event ranges from which of the following?

Stat210 WorkSheet#2 Chapter#2

Determine the Expected value for each die: Red, Blue and Green. Based on your calculations from Question 1, do you think the game is fair?

Probability. Sometimes we know that an event cannot happen, for example, we cannot fly to the sun. We say the event is impossible

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 13

Chapter 16. Probability. For important terms and definitions refer NCERT text book. (6) NCERT text book page 386 question no.

Contemporary Mathematics Math 1030 Sample Exam I Chapters Time Limit: 90 Minutes No Scratch Paper Calculator Allowed: Scientific

Name: Exam Score: /100. Exam 1: Version C. Academic Honesty Pledge

Math : Probabilities

PROBABILITY. 1. Introduction. Candidates should able to:

Probability. Probabilty Impossibe Unlikely Equally Likely Likely Certain

Expected Value, continued

PRE TEST KEY. Math in a Cultural Context*

November 8, Chapter 8: Probability: The Mathematics of Chance

STATISTICS and PROBABILITY GRADE 6

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Name: 1. Match the word with the definition (1 point each - no partial credit!)

INDEPENDENT AND DEPENDENT EVENTS UNIT 6: PROBABILITY DAY 2

GCSE MATHEMATICS Intermediate Tier, topic sheet. PROBABILITY

Compound Events. Identify events as simple or compound.

Week in Review #5 ( , 3.1)

Name Date. Probability of Disjoint and Overlapping Events For use with Exploration 12.4

A. 15 B. 24 C. 45 D. 54

A B C. 142 D. 96

Section The Multiplication Principle and Permutations

Outcomes: The outcomes of this experiment are yellow, blue, red and green.

The study of probability is concerned with the likelihood of events occurring. Many situations can be analyzed using a simplified model of probability

Probability. Ms. Weinstein Probability & Statistics

Name: Probability, Part 1 March 4, 2013

4.1 What is Probability?

The Last Diminisher Method Game Steps

SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question.

There is no class tomorrow! Have a good weekend! Scores will be posted in Compass early Friday morning J

7.1 Chance Surprises, 7.2 Predicting the Future in an Uncertain World, 7.4 Down for the Count

Conditional Probability Worksheet

Discrete Structures for Computer Science

If a regular six-sided die is rolled, the possible outcomes can be listed as {1, 2, 3, 4, 5, 6} there are 6 outcomes.

MTH 103 H Final Exam. 1. I study and I pass the course is an example of a. (a) conjunction (b) disjunction. (c) conditional (d) connective

Find the probability of an event by using the definition of probability

ECON 214 Elements of Statistics for Economists

CHAPTER 7 Probability

1. The chance of getting a flush in a 5-card poker hand is about 2 in 1000.

Grade 6 Math Circles Fall Oct 14/15 Probability

Unit 1B-Modelling with Statistics. By: Niha, Julia, Jankhna, and Prerana

Key Concepts. Theoretical Probability. Terminology. Lesson 11-1

Probability Distributions. Probability Distributions. J. Boulton. May 08, 2013 MDM 4U1. Where are we?

CS 787: Advanced Algorithms Homework 1

LISTING THE WAYS. getting a total of 7 spots? possible ways for 2 dice to fall: then you win. But if you roll. 1 q 1 w 1 e 1 r 1 t 1 y

Transcription:

CS02 Discrete Structures Recitation Fall 207 October 30 - November 3, 207 CS02 Week 9: Probability, Expectation, Entropy Simple Probabilities i. What is the probability that if a die is rolled five times, only two different values appear? ii. Which is more likely, rolling an when two dice are rolled, or rolling an when three dice are rolled? iii. How many ways are there for 0 people to have 5 simultaneous phone conversations?

In the Ace Discrete Math board game, moves are determined by a role of a pair of -sided dice. i. How many possible outcomes are there for a roll of this pair of dice? ii. What is the probability that the sum of the numbers rolled is 5? iii. What is the probability that the sum of the numbers rolled is 9? iv. What is the probability that both numbers rolled are odd? v. What is the probability that the numbers rolled are not equal? 2

Simple Probabilities 2 i. Yahtzee! In the dice game Yahtzee, each player has five 6-sided dice (assume dice can be differentiated). They roll them (first throw) to get five values of -6. Second throw: the player can choose to keep some of the dice values (or all, or none), and re-throw the others dice thus updating their values. Particular final dice outcomes (eg. straights, 3 of a kind, or 5 of a kind (a Yahtzee)) earn more points than others, based on how probable the outcome is. What is the probability of the following : On the first role: Getting a yahtzee with 3s Getting any yahtzee A large straight (either 2,3,,5,6 or,2,3,,5) On the first role, you have three of a kind, say three values of 2. You keep them, and re-roll the other two dice. What is the chance of A large straight A yahtzee A full house (three of a kind (value 2); and a pair same value not 2) Four of a kind (but not yahtzee) Note: For more information on Yahtzee and the actual probabilities of outcomes you can see http://mathworld.wolfram.com/yahtzee.html. 3

ii. Super Hungry Hungry Hippos The game Hungry Hungry Hippos involves players trying to catch (or eat) the most marbles using plastic hippos. Super Hungry Hungry Hippos uses kinds of marbles and the person with the most points wins. There are 0 reds ( point each), 6 greens (2 points), 3 blues (3 points), and one black super marble (6 points). Calculate the probability of the following scenarios: You catch 0 marbles (randomly) and your opponent catches 0. What is the chance you caught the black marble? What is the chance you earn exactly 0 points? What is the chance you caught exactly 2 green marbles? What is the chance you won if you only catch 6 marbles?

Expectation i. For a sequence of 3 tosses of a fair coin.. What is the size of the sample space? 2. What is the expected value for the number of heads? ii. We choose a random permutation of the numbers, 2, 3,. We get a, a 2, a 3, a. (For example we might get 2, 3,,.) What is the expected value of the number of elements such that a i = i (number of fixed points of the permutation). iii. You can play the following game 00 times: You roll a dice. If the result is x and x is even, you get x extra points to your grade in CS 02. If the result is odd you lose 3.5 points. Should you play this game? 5

iv. We roll a pair of fair dice (with 6 faces). What is the expected value for each of the following (these are random variables):. The value of the second dice. 2. The sum of the values of both dice. 3. The value of the first dice times the value of the second dice (multiplying the values). v. We toss a fair coin 2 times. We consider head as and tail as 0.. What is the expected value of the second coin toss? 2. What is the expected value of the sum of the 2 results? 3. What is the expected value of the sum of the 2 results times the result of the second toss? 6

Entropy i. You are given the following 2 codes for a, b, c, d, e, f, g, h: Letter Code Letter Code 2 a 000 a b 00 b 0 c 00 c 0 d 0 d 00 e 00 e 00 f 0 f 000 g 0 g 000 h h 0000. Encode the following strings into bits using the 2 different codes (sequences of 0 s and s). (a) abcdefgh (b) abbbadgh Which code is better? 2. Which code is better if you know that the frequency in which the letters appear is given by: Letter a b c d e f g h Frequency 6 6 6 6 7

3. Which code is better if you know that the frequency in which the letters appear is given by: Letter a b c d e f g h Frequency 6 6 6 6 7. Which code is better if you know that the frequency in which the letters appear is given by: Letter a b c d e f g h Frequency 6 6 6 6 5. Compute the entropy function H(p) for all the above distributions. If the probability is not a power of 2 you don t need to evaluate the log 2.

6. Decode the following sequence of bits into letters using code and using code 2 (It is not always the case that a sequence of bits can be decoded by 2 different codes). 000000 9

ii. You work in the cell phone company BestPhone. Your company is offering an amazing new service to its customers, the ability to send text messages with emojis. Your company allows its costumers to send 256 different emojis.. BestPhone must pay cent for each bit it sends over the network. It uses a fixed-length code to encode the different emojis. What is the minimum price that BestPhone must charge for sending an emoji in order not to lose money? 2. You did some research and you discovered that 2 of the emojis that are being sent are the smiley emoji, 256 of the emojis are the sad face, and the rest are equidistributed with probability 52. You realize that BestPhone can do better. Suggest a more efficient code. What is the minimum price that BestPhone must charge for sending an emoji in order not to lose money? Explain how can this be done. 0