Random Thoughts 2012 (COMP 066) Jan-Michael Frahm Jared Heinly Last Class Odds vs Probability # satisfying P(A) = # total events # satisfying Odds(A) = # not satisfying 2 Assignment • Calculate the probability of Lens Armstrong winning the Tour de France seven times in a row. • For the assignment please explain why you use the probability calculations that you leverage to compute his winning probability. • Provide the source data that you use to compute the probability along with an Excel spreadsheet used for the calculations. Refer to the cells in the Excel spreadsheet in you written explanation. 3 Values to Summarize Data • Mean (EXCEL: AVERAGE(<range>) • can informally be seen as the middle of the data • be careful they do not always tell the whole story outliers influence the mean (significantly) 4 Median • Median (EXCEL: MEDIAN(<range>)) 1) Order the data from smallest to largest 2) If the dataset is an odd number the median is the one in the middle. If there is an even number of data the average of the middle two is the median • Which measure should be used mean or median? reporting both is never a problem • Always ask for the other if given only one 5 Measure of Variability • Standard deviation (EXCEL: STDEV.S(<range>)) 1. Find the average of the data 2. Subtract average from the data 3. Square the differences 4. Divide the sum of squares by the number of data minus one (this is also called variance) 5. Take the square root of the variance 6 Standard Deviation Properties • Can never be negative • Smallest possible value is 0 • Effected by outliers • Same unit as original data 7 Percentile • k-th percentile 1. Order all numbers in the dataset 2. Multiply k percent times the number of data points n round up if not a whole number 3. Find the value at the in step 2 computed position. Then the kth percentile is the average of that number and the next number • median is the 50-th percentile • percentile is not a percent it a number that is a certain percentage of the way through the dataset 8 Dice Game • Players choose their ladybug numbers and place ladybugs on those numbers. If 2 players, each player gets 3 ladybugs to place. If 3 players, each player gets 2 ladybugs to place. • Player A tosses the die and the player whose ladybug has that number of spots moves 1 space. • Player B tosses the die and the player whose ladybug has that number of spots moves 1 space. • Play continues until the first ladybug reaches her home. • The winning player makes a tally next to the winning ladybug on the Class Recording Sheet. 9 Dice Game Each player’s turn consists of repeatedly rolling a die. After each roll, the player is faced with two choices: roll again, or hold (decline to roll again). If the player rolls a 1, the player scores nothing and it becomes the opponent’s turn. If the player rolls a number other than 1, the number is added to the player’s turn total and the player’s turn continues. If the player holds, the turn total, the sum of the rolls during the turn, is added to the player’s score, and it becomes the opponent’s turn. • What is a good strategy to win? 10