Problem 1. Dice Rolls If you roll a pair of fair dice, what is the probability of..
getting a sum of 1?
probability is 0
getting a sum of 5?
probability is 0.11111111
getting a sum of 12?
probability is 0.02777778
—requires dice package—
library(dice)
## Loading required package: gtools
getSumProbs(ndicePerRoll = 2,
nsidesPerDie = 6)
## $probabilities
## Sum Probability Ways to Roll
## [1,] 2 0.02777778 1
## [2,] 3 0.05555556 2
## [3,] 4 0.08333333 3
## [4,] 5 0.11111111 4
## [5,] 6 0.13888889 5
## [6,] 7 0.16666667 6
## [7,] 8 0.13888889 5
## [8,] 9 0.11111111 4
## [9,] 10 0.08333333 3
## [10,] 11 0.05555556 2
## [11,] 12 0.02777778 1
##
## $average
## [1] 7
Problem 2. School absences Data collected at elementary schools in DeKalb County, GA suggest that each year roughly 25% of students miss exactly one day of school, 15% miss 2 days, and 28% miss 3 or more days due to sickness.
x = 1 -(.25+.15+.28)
x
## [1] 0.32
x = .32+.25
x
## [1] 0.57
x = .25+.15+.28
x
## [1] 0.68
If a parent has two kids at a DeKalb County elementary school, what is the probability that neither kid will miss any school? Note any assumption you must make to answer this question.
Assuming independent
x = .32*.32
x
## [1] 0.1024
If a parent has two kids at a DeKalb County elementary school, what is the probability that both kids will miss some school, i.e. at least one day? Note any assumption you make.
Assuming independent
x = .68*.68
x
## [1] 0.4624
If you made an assumption in part (d) or (e), do you think it was reasonable? If you didn’t make any assumptions, double check your earlier answers.
Might not be reasonable to make the assumption in (d) and (e) since sickness is the cause of missing school, sickness can spread and be contagious. Most likely the two children live in the same household.
Problem 3. Health coverage, relative frequencies The Behavioral Risk Factor Surveillance System (BRFSS) is an annual telephone survey designed to identify risk factors in the adult population and report emerging health trends. The following table displays the distribution of health status of respondents to this survey (excellent, very good, good, fair, poor) and whether or not they have health insurance.
mat=matrix(c(.023, 0.0364, 0.0427, 0.0192, 0.0050,0.2099, 0.3123 ,0.2410 ,0.0817,0.0289), byrow=TRUE, nrow=2)
colnames(mat)=c("Excellent", "Very Good","Good", "Fair","Poor")
rownames(mat)=c("No Coverage","Coverage")
mat
## Excellent Very Good Good Fair Poor
## No Coverage 0.0230 0.0364 0.0427 0.0192 0.0050
## Coverage 0.2099 0.3123 0.2410 0.0817 0.0289
Are being in excellent health and having health coverage mutually exclusive?
No
What is the probability that a randomly chosen individual has excellent health?
x = .0230+.2099
x
## [1] 0.2329
x = .2099/sum(mat[2,])
x
## [1] 0.2402152
x = .0230/sum(mat[1,])
x
## [1] 0.1821061
Do having excellent health and having health coverage appear to be independent?
No
Problem 4. Exit Poll. Edison Research gathered exit poll results from several sources for the Wisconsin recall election of Scott Walker. They found that 53% of the respondents voted in favor of Scott Walker. Additionally, they estimated that of those who did vote in favor for Scott Walker, 37% had a college degree, while 44% of those who voted against Scott Walker had a college degree. Suppose we randomly sampled a person who participated in the exit poll and found that he had a college degree. What is the probability that he voted in favor of Scott Walker?
mat=matrix(c(.1961, 0.3339, 0.2068, 0.2632), byrow=TRUE, nrow=2)
colnames(mat)=c("Degree", "NoDegree")
rownames(mat)=c("VoteWalker","NoVoteWalker")
mat
## Degree NoDegree
## VoteWalker 0.1961 0.3339
## NoVoteWalker 0.2068 0.2632
x =.1961/sum(mat[,1])
x
## [1] 0.4867213
Problem 5. Books on a bookshelf The table below shows the distribution of books on a bookcase based on whether they are nonfiction or fiction and hardcover or paperback.
mymat2=matrix(c(13,59,15,8),nrow=2,byrow=TRUE)
colnames(mymat2)=c("hard","paper")
rownames(mymat2)=c("fiction","nonfiction")
mymat2
## hard paper
## fiction 13 59
## nonfiction 15 8
x = sum(mymat2[,1]/sum(mymat2))*(59/(sum(mymat2)-1))
x
## [1] 0.1849944
x = sum(mymat2[1,]/sum(mymat2))*(sum(mymat2[,1]/(sum(mymat2)-1)))
x
## [1] 0.2257559
x = sum(mymat2[1,]/sum(mymat2))*sum(mymat2[,1])/sum(mymat2)
x
## [1] 0.2233795
The final answers to parts (b) and (c) are very similar. Explain why this is the case.
Total books difference was only 1 book.
Problem 6. Is it worth it? Andy is always looking for ways to make money fast. Lately, he has been trying to make money by gambling. Here is the game he is considering playing: The game costs 2 dollars to play. He draws a card from a deck. If he gets a number card (2-10), he wins nothing. For any face card (jack, queen or king), he wins 3 dollars. For any ace, he wins 5 dollars and he wins an extra $20 if he draws the ace of clubs.
x = (36/52*-2)+(12/52*1)+(3/52*3)+(1/52*23)
x
## [1] -0.5384615
Would you recommend this game to Andy as a good way to make money? Explain.
No, there is money to be made from this.
Problem 7. Scooping ice cream. Ice cream usually comes in 1.5 quart boxes (48 fluid ounces), and ice cream scoops hold about 2 ounces. However, there is some variability in the amount of ice cream in a box as well as the amount of ice cream scooped out. We represent the amount of ice cream in the box as X and the amount scooped out as Y . Suppose these random variables have the following means, standard deviations, and variances:
mymat3=matrix(c(48,1,1, 2,.25,.0625), nrow=2, byrow=TRUE)
colnames(mymat3)=c("mean", "SD", "Var")
rownames(mymat3)=c("X, In Box","Y, Scooped")
mymat3
## mean SD Var
## X, In Box 48 1.00 1.0000
## Y, Scooped 2 0.25 0.0625
x = 48+3*2
x
## [1] 54
x = sqrt(1+.0625+.0625+.0625)
x
## [1] 1.089725
x = 48-2
x
## [1] 46
x = sqrt(1+.0625)
x
## [1] 1.030776
Using the context of this exercise, explain why we add variances when we subtract one random variable from another.
overall variability is still increased