Casino Games Activity 3
8
Data and statistics What is a box and whisker plot? The following table reports the average monthly temperatures for San Francisco, California and for Raleigh, North Carolina. Dotplots of these twelve temperatures for each city appear below. Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Raleigh
39
42
50
59
67
74
78
77
71
60
51
43
S.F.
49
52
53
56
58
62
63
64
65
61
55
49
As you can figure out, the median temp for Raleigh is 59.5, while the median temp for S.F. is 57. These two numbers are pretty close to each other, but we can’t conclude that there is no difference between the two cities with regard to monthly temperature. You can see that Raleigh has more variability. Variability is measured with range or standard deviation, among other statistics. You might also use interquartile range (IQR) as a measure of variability. IQR divides the data into four (roughly) equal parts, then finds how far apart the 25% line is from the 75% line.
Let’s find the lower quartile for the Raleigh data. Here’s the complete data set in order: 39
42
43
50
51
59
60
67
71
74
77
78
There are 12 data values, so the median is the mean of the 6th and 7th, 59 and 60 = 59.5. To find the lower quartile, list all of the values below the median. Then find the median of that list. 39
42
43
50
51
59
There are 6 data values, so the median is the mean of the 3rd and 4th, 43 and 50. (43 + 50)/2 = 46.5. 46.5 is the lower quartile. Find the upper quartile in the same manner. 60
67
71
74
77
78
Upper quartile = (71 + 74)/2 = 72.5. Thus, the IQR is 72.5 (upper quartile) minus 46.5 (lower quartile) = 26.
The median, quartiles, and extremes (minimum and maximum) of a distribution are called the five-number summary, which gives a quick description of the data. Here’s the five-number summary (plus the mean for comparison) for Raleigh. These five numbers form the basis for a boxplot, sometimes called a box and whisker plot. To make a boxplot, draw a rectangle, or box, between the quartiles. Horizontal lines called whiskers are extended from the middle of the sides of the box to the extremes. Then the median is marked with a vertical line inside the box.
How do I know what plot to use?
Type of plot
For what kind of data is this appropriate?
Advantages
Drawbacks
bar graph
comparing categorical (word) variables
simple, works well for categorical (word) variables
doesn’t make sense for quantitative (number) variables
circle graph
comparing categorical (word) variables
visually simple, makes sense to most people
doesn’t make sense for quantitative (number) variables, can be manipulated to distort data
dotplot
a single quantitative variable
keeps all data values, provides visual distribution for quantitative data
cumbersome for large data sets
stem plot
a single quantitative variable
keeps all data values, provides visual distribution for quantitative data, simplifies dot plot structure without losing detail
cumbersome for large data sets
histogram
a single quantitative variable
works for large data sets
loses some detail in bunching data into subranges
scatterplot
appropriate for comparing two quantitative variables
can see trends and comparisons
sometimes difficult to recognize linear vs. nonlinear trends
boxplot
a single quantitative variable
simple, shows essential parts of a distribution
loses most of the detail in the data
8
8
8
Problem Set 6
1. Give the five number summary for the San Francisco temperatures. 2. Construct a box plot for the San Francisco temperatures. Compare and contrast with the Raleigh boxplot. 3. For each data description, name an appropriate plot to display the data. a. The heights of a class of 20 6th graders b. Comparing size of a house to the amount of energy used by the house c. Comparing the percentage of voters who voted for the different candidates in the 2008 presidential election d. The heights of 10,000 6th graders nationwide
Sets What is a Venn diagram? You’ve probably encountered Venn diagrams before. They show how sets interact with each other. The diagram here shows a very basic Venn diagram. The rectangle represents “everything.” The circle shows a set that doesn’t include everything. Some stuff is in the set, and some isn’t. An example would be for the rectangle to represent the set of all animals, while the circle shows only marsupials. (Venn diagrams usually don’t show scale—the size of the circle compared to the size of the rectangle doesn’t show proportion. There’s no way marsupials would take up that much space in the set of all animals.) The diagram you’re probably used to seeing looks like this. Maybe the left circle represents “mammals” while the right circle represents “animals that live in the ocean.” Then “whales” would in in the intersection of set 1 and 2.
Another common Venn diagram looks like this. Set 1 could be mammals, while set 2 is marsupials. All marsupials are mammals.
What are union, intersection, and complement? The union of two sets is the stuff is set 1, set 2, or both. The intersection of two sets is only the stuff in both sets. The complement of a set is everything not in the set. Look at the diagram to the right. M = the set of all mammals O = the set of all animals that live in the ocean
The union of M and O is notated like this:
M ∪O
and a Venn diagram showing union would have both circles shaded.
The intersection of M and O is notated like this:
M ∩O
and a Venn diagram showing union would have only the sliver in both circles shaded.
The complement of M is notated like this:
M′
and a Venn diagram showing the complement show have everything shaded but the set M
shaded but the set M
Problem Set 7 Given the Venn diagram here, where E = the set of even numbers M = multiples of 3 1. Describe E ∩ M . 2. Describe E ∪ M . 3. Describe E ′. 4.€Create your own Venn diagram with stuff in € set: the first set, second set, intersection, every € neither set. and
the rectangle represents the set of all numbers
Probability What are odds? Sometimes probabilities are given in terms of odds. This is especially common in gambling. Example 1: Suppose the weather forecaster says that the probability of rain tomorrow is 1/3. Find the odds in favor of rain tomorrow. Since P(rain tomorrow) = 1/3, the probability of the complement, P(no rain tomorrow) is 2/3. Then the odds in favor of rain are 1/3 divided by 2/3 = 1/2. When we’re talking about odds, we write this as 1:2 or “1 to 2.” Example 2: What are the odds of flipping a coin and getting tails? Since P(tails) = 1/2, the probability of the complement, P(heads) is 1/2. Then the odds in favor of rain are 1/2 divided by 1/2 = 1/1. When we’re talking about odds, we call this “even odds.” Example 3: If the odds in favor of a particular horse’s winning a race are 5 to 7, what is the probability that the horse will win the race? The odds say there are 5 ways for the horse to win, and 7 to lose. 5 + 7 = 12 total way, so the probability the horse wins is 5/12. However, racetracks generally give the odds against a horse winning, so at Canterbury they’d quote the odds as 7 to 5.
Odds get confusing for a couple reasons. Normally, in gambling, odds are quoted as odds against. Instead of giving 1:2 odds that it will rain tomorrow (according to example 1), an oddsmaker would give 2:1 odds against it raining. If you bet $1 that it would rain and were correct, you’d get $2, plus your original bet, in return. The other confusing thing is that in gambling, the odds represent the payout rather than the theoretical probability. Oddsmakers will increase odds so that they make money on the wagering no matter what happens.
Problem Set 8
1. The odds against getting a royal flush in poker on first five cards dealt is 649,740 to 1. Find the probability of this event. 2. As I write this, North Carolina is about to play Duke in college basketball. According to the oddsmakers, the probability North Carolina will win is 8/13. What are the odds against Duke winning?
Counting What is the multiplication principle? If there is are a series of choices to be made, and you want to find the number of possibilities of making all those choices, multiply the number of possibilities for the first choice times the number for the second choice times the number for the third choice, and so on. Example 1: A certain combination lock can be set to open to any one 3-letter sequence. How many such sequences are possible? Since there are 26 letters in the alphabet, there are 26 choices for each of the 3 letters. By the multiplication principle, there are 26 * 26 * 26 = 17,576 different possible sequences. Example 2: A teacher has 5 different books that he wishes to arrange side by side. How many different arrangements are possible? Five choices will be made, one for each space that will hold a book. Any of the 5 books could be chosen for the first space. Once that first book is chosen, however, there are only 4 books for the second slot. Then there are only 3 choices for the third, and so on. By the multiplication principle, the number of different possible arrangements is 5 * 4 * 3 * 2 * 1 = 120.
The use of the multiplication principle often leads to products such as 5 * 4 * 3 * 2 * 1, the product of all natural numbers from 5 down to 1. If n is a natural number, the symbol n! (read “n factorial”) gives the product of all the natural numbers from n down to 1. Example 3: What is 4! equal to? 4 * 3 * 2 * 1 = 24 Example 4: What is 0! equal to? 0! is defined as being equal to 1.
Problem Set 9
1. 6! 2. 7! 3. How many different types of homes are available if a builder offers a choice of 5 basic plans, 3 roof styles, and 2 exterior finishes? 4. A couple has narrowed down the choice of a name for their new baby to 3 first names and 5 middle names. How many different first- and middle-name arrangments are possible?