Below are the probabilities for the USC football team winning a total of n games in the first half season. What is the expected number of games USC will win in the first half season?
\(E(n)=\sum_i P(n_i)\times n_i\)
######Build the Probability Mass Function######
Pn=c(.001, .010, .060, .185, .304, .332, .108)
n=c(0,1,2,3,4,5,6)
names(Pn)=n
mymat=data.frame(t(cbind(n,Pn)))
rownames(mymat)=c("n", "Pn")
colnames(mymat)=n
###############################################
mymat[2,]
## 0 1 2 3 4 5 6
## Pn 0.001 0.01 0.06 0.185 0.304 0.332 0.108
###############################################
En=sum(Pn*n) #by definition of E
names(En)="E(n)" #label the value
names(Pn)=n
###############################################
En
## E(n)
## 4.209
Odds makers try to predict which football team will win and by how much (the spread). If they are correct, adding the spread to the loser’s score would produce a tie. Suppose you can win $6 for every dollar you bet if you can predict the winner of three consecutive games. What is your expected value for this bet?
\(E(Y)=\sum_i P(Y_i) \times Y_i=6 \times.5^3-1\times(1-.5^3)\)
#assume even probability of win!
###############################################
WinPy = .5^3 #.125
LosePy=1-WinPy #.875
EY=WinPy*6-1*LosePy
names(EY)="E(Y) per Dollar"
###############################################
EY
## E(Y) per Dollar
## -0.125
If the random variable X assigns to each card of a standard deck the face value of that card, except X(Ace) = 1 and X(Jack) = X(Queen) = X(King) = 10. What is the expected value of X
\(E(X)=\sum_i P(X_i) \times X_i\)
###############################################
X=c(seq(1:10))
PX=c(rep(4/52, 9), 16/52) #16 10's - K's
###############################################
###############################################
EX=sum(X*PX)
names(EX)="E(X)"
###############################################
EX
## E(X)
## 6.538462
Dick and Jane are playing a game until someone wins three times. If the game is interrupted with Jane leading two wins to one win, how should they divide the prize money?
\(P(Dwins) = 1-P(Jwins) = 1-P(Jwins=0 | N=2, \pi=.5)\)
###############################################
split=1-dbinom(0,2,.5)
names(split)="Split for Jane"
###############################################
split
## Split for Jane
## 0.75
Jane and Tom are playing a game to 7 points and presently Tom has 6 points and Jane has 5 points. The game must be halted. How should Tom and Jane divide the prize money
\(P(Jwins) = 1-P(Twins) = 1-P(Twins=0 | N=2, \pi=.5)\)
###############################################
splitforT=1-dbinom(0,2,.5)
names(splitforT)="Split for Tom"
###############################################
splitforT
## Split for Tom
## 0.75
What are the odds against selecting a spade when you draw one card from a standard deck of 52 cards?
39 non-spades versus 13 non-spades or better yet 3 suits vs. 1 suit: \(39:13 = 3:1\)
What are the odds against rolling doubles when you roll two dice?
30 non-doubles vs. 6 doubles. \(30:6 = 5:1\)
You play with a loaded die where the probabilities of rolling any number are \(P(1)=P(2)=P(3) = 1/12\) and \(P(4)=P(5)=P(6) = 1/4\). If X is the random variable whose values are the possible outcomes of rolling this loaded die, find the mean, standard deviation, and variance for this data set and probability distribution.
\(E(die)=\sum_i P(die_i) \times X_i\)
\(V(die)=\sum_i P(die_i) \times (die_i-E(die))^2\)
\(S(die)=\sqrt{V(die)}\)
###############################################
die=c(1,2,3,4,5,6)
Pdie=c(1/12, 1/12, 1/12, 1/4, 1/4, 1/4)
Edie=sum(die*Pdie)
names(Edie)="E(die)"
vardie=sum(Pdie*(die-Edie)^2)
names(vardie)="V(die)"
Sdie=sqrt(vardie)
names(Sdie)="S(die)"
###############################################
print(c(Edie, vardie, Sdie))
## E(die) V(die) S(die)
## 4.250000 2.354167 1.534329
Find the variance and standard deviation for the probability distribution of Exercise 1.6.
We flip a fair coin and associated with the resulting flip f is the random variable X(f)=2 if f is a head and X(f)=-1 if f is a tail.
###############################################
f=c(2,-1)
Pf=c(.5,.5)
Ef=sum(f*Pf)
Varf=sum(Pf*(f-Ef)^2)
Sf=Varf^.5
names(Varf)="V(f)"
names(Sf)="S(f)"
###############################################
print(c(Varf, Sf))
## V(f) S(f)
## 2.25 1.50
Explain the thinking of The Chevalier de Mere in wrongly believing he should do as well in the second game as in the first.
The Chevelier did not understand the probability of obtaining a 12 was 1/36. In fact, he probably considered a uniform probability distribution rather than the actual one..