Probability Distributions: Expected Value and Variance Calculation for Dice Rolls, Exams of Computer Science

Solutions to various problems related to probability distributions, specifically for the absolute value of the difference between the outcomes of two dice rolls. The problems involve calculating the distribution function, expected value, and variance for different values of the difference. The solutions are based on the concept of equiprobability and the use of the binomial distribution.

Typology: Exams

Pre 2010

Uploaded on 03/28/2010

koofers-user-638
koofers-user-638 🇺🇸

10 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Midterm 2, CSE21, Fall 2001
Student Name:
Instructions:
Begin by writing your name above.
This is a closed book and notes exam. The exam includes the table for calculating
probabilities using the normal distribution. You may not use calculators.
Try all problems. Write your answers on the exam sheet itself, in the assigned space
below the problem, or on the extra blank page that follows.
Suggestions:
Scan through the entire exam before b eginning any question. You don't
have to do the questions in order: do rst whatever you nd easiest.
Guidelines:
Remember to write clearly: answers that don't make sense will not get partial
credit. You are graded on what you write, not on what you think you mean! So read carefully
what you write.
1. indicate with a brief note the application of the Rule of Product, Rule of Sum, inclusion-
exclusion principle.
2. When a random variable of interest follows the binomial, or Poisson or normal distri-
bution, write the distribution of the random variable. For example, write \variable
X
follows the normal distribution with mean 100 and standard deviation 10" or \variable
X
follows the binomial distribution
b
(
k
;
n; p
)". Such notes will help you get partial
credit if the nal answer is wrong. When computing probabilities in equiprobable
spaces indicate the size of the universal set and the size of the event set.
Important Note:
For all problems the following types of answers are OK:
Formulas involving
n
!,
n
k
,
n
m
k
,
the Poisson distribution
p
(
k
;
)=
e
,
k
k
!
HOWEVER, in multiple choices that ask for the specic number, calculations havetobe
done.
Good luck!
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Probability Distributions: Expected Value and Variance Calculation for Dice Rolls and more Exams Computer Science in PDF only on Docsity!

Midterm 2, CSE21, Fall 2001

Student Name:

Instructions: Begin by writing your name ab ove. This is a closed b o ok and notes exam. The exam includes the table for calculating probabilities using the normal distribution. You may not use calculators. Try all problems. Write your answers on the exam sheet itself, in the assigned space b elow the problem, or on the extra blank page that follows.

Suggestions: Scan through the entire exam b efore b eginning any question. You don't have to do the questions in order: do rst whatever you nd easiest.

Guidelines: Rememb er to write clearly: answers that don't make sense will not get partial credit. You are graded on what you write, not on what you think you mean! So read carefully what you write.

  1. indicate with a brief note the application of the Rule of Pro duct, Rule of Sum, inclusion- exclusion principle.
  2. When a random variable of interest follows the binomial, or Poisson or normal distri- bution, write the distribution of the random variable. For example, write \variable X follows the normal distribution with mean 100 and standard deviation 10" or \variable X follows the binomial distribution b(k ; n; p)". Such notes will help you get partial credit if the nal answer is wrong. When computing probabilities in equiprobable spaces indicate the size of the universal set and the size of the event set.

Imp ortant Note: For all problems the following typ es of answers are OK:

 Formulas involving n!,

n

k

, n  m  k ,

 the Poisson distribution p(k ; ) = e^  kk!

HOWEVER, in multiple choices that ask for the sp eci c numb er, calculations have to b e done.

Go o d luck!

Scores: To b e lled in at grading time.

On Problem You got Out of

Extra Credit 15

Total: 65/

iii. 0 : 9544 iv. 0 : 3413 v. 1 : 3413 Solution: Again, we transform our problem from a problem on X to a problem on the random variable T that follows the standard normal distribution.

P (8  X ) = P (

 T ) = P ( 1  T )

We transform to reduce the ab ove to Case 2 of the handout.

P ( 1  T ) = P ( 1  T  0)+P (0  T ) = P ( 1  T  0)+

= P ( 1  T  0)+

From Case 2 we know that P ( 1  T  0) = P (0  T  1) and lo oking in the table we nd P (0  T  1) = 0 :3413. Our nal answer is then, 0 :8413, which is option i.

Remark You may conclude that P (0  T ) = 12 in one of two ways: i. The symmetry of the standard normal distribution around 0 indicates that P (0  T ) = P (0  T ) = 12. ii. You may think of P (0  T ) as P (0  T  1 ). By lo oking into the table it is easy to see that P (0  T  1 ) = 12.

(d) Win 4, lose 1 Carla on the average gets a u once every 12 months. What is the probability that she will get the u in Novemb er? i. (^1112) ii. e^ 121 11 12 iii. e^ 121 1 12 iv. 1 e^121 v. e^121 Solution: Lets de ne our unit of time to b e a month. The rate of \ u arrivals for Carla" is  = 121. Then, we use the Poisson distribution p(k ; ) = e^  kk! , where  = 121 and k = 0 to nd the probability that Carla will not get the u. Then the answer is 1 p(0;

) = 1 e^ 121

So the nal answer is option iv. (e) Win 4, lose 1 Carla on the average gets a u once every 12 months. What is the probability that she will not get the u in Novemb er? (Hint: 0! = 1) i. (^1112) ii. e^ 121 11 12

iii. 1 e^ 121 1 12 iv. 1 e^ 121 v. e^ 121 Solution: The rate of \ u arrivals for Carla" is again  = 121. Then, using the same expression, where  = 121 and k = 0.

p(0;

) = e^ 121

12

= e^ 121

So the nal answer is option v.

(f ) Win 5, lose 1 We toss a fair die. The outcome of the exp eriment is a numb er from U = f 1 ; 2 ; 3 ; 4 ; 5 ; 6 g and all outcomes are equally probable. Next we de ne the random variables X : U 7! R and Y : U 7! R as follows:

X (t) = f 0 ;^ if^ t^2 f^1 ;^2 ;^3 g 1 ; if t 2 f 4 ; 5 ; 6 g

and

Y (t) = f

0 ; if t 2 f 1 ; 3 ; 5 g 1 ; if t 2 f 2 ; 4 ; 6 g

The joint distribution hX ;Y of X and Y is i. hX ;Y X = 0 X = 1 Y = (^0 ) Y = (^1 )

ii. hX ;Y X = 0 X = 1 Y = (^0 ) Y = (^1 )

iii.

hX ;Y X = 1 X = 2 X = 3 X = 4 X = 5 X = 6 Y = 1 16 0 0 0 0 0 Y = 2 0 16 0 0 0 0 Y = 3 0 0 16 0 0 0 Y = 4 0 0 0 16 0 0 Y = 5 0 0 0 0 16 0 Y = (^6 0 0 0 0 0 )

iv. none of the ab ove

How much money do es John win or lose on the average in each round? Solution: We de ne the random variable X : U 7! R as follows:

X (t) = f (^25) 1 ;^ ; ifif^ tt^ isis^ a a^ seq seq^ uence uence^ of of^1010 dr dr^ aw aw^ s s^ that that^ contains does not^ exactlcontain^ y^3 exactl^ aces y 3 aces

We compute the probability that X = 25, i.e., the probability that John wins b ecause he drew exactly 3 aces, using the binomial distribution.

n k

pk^ (1 p)nk

In particular, the sequence of n = 10 draws is a sequence where an exp eriment is rep eated 10 times and the desired outcome (an ace is drawn) happ ens with probability p in each round. There are 4 aces in a deck of 52 cards, so p = 4 =52. We know then, that the probability of drawing exactly k = 3 aces is

P (k = 3) =

The probability that not exactly three aces are drawn is

1 P (k = 3)  0 : 9688

So the exp ectation is:

E (X ) = 25  0 : 0312 + (1)  0 : 9688 = ( 0 :1888)

So John loses 18.88 cents on the average in each round.

  1. 20 p oints Consider an exp eriment where a pair of fair dice is thrown. The universal set U is the set of all pairs of outcomes of the two dice, i.e.,

U = f[x; y ] j x; y 2 f 1 ; 2 ; 3 ; 4 ; 5 ; 6 gg

Let X : U 7! R b e the random variable that denotes the absolute value of the di erence of the two dice, that is X ([x; y ]) = jx y j For example,

(a) if the rst die turns out to b e 5 and the second turns out to b e 1, then

X ([5; 1]) = j 5 1 j = 4

(b) if the rst die turns out to b e 1 and the second turns out to b e 5, then

X ([1; 5]) = j 1 5 j = 4

(c) if the rst die turns out to b e 5 and the second turns out to b e 5, then

X ([5; 5]) = j 5 5 j = 0

Compute the distribution fX , the exp ectation E (X ), the variance V ar (X ), and the standard deviation X.

Solution:

 Our universal set U is

U = f[x; y ] j x 2 f 1 ; : : : ; 6 g; y 2 f 1 ; : : : ; 6 gg

, i.e., it is the set of all p ossible ordered pairs of the outcomes of two dice. Let us recognize that since our dice are fair, each pair is equally probable with every other pair, i.e., the space is equiprobable. Then the random variable X : U 7! R maps each pair [x; y ] to a numb er from 1 to 6 as follows: X ([x; y ]) = jx y j: Obviously imag e(X ) = f 0 ; : : : ; 5 g. To calculate the exp ectation E (X ), we once again need to compute the probability distribution function fX : imag e(X ) 7! R. In particular, for every p ossible value r of imag e(X ), i.e., for every numb er from 0 to 5, we need to compute fX (r ).

fX (r ) = P (X = r ) = P (X ^1 (r )) = P (f[x; y ] j [x; y ] 2 U; jx y j = r g):

Since the space is equiprobable

P (f[x; y ] j [x; y ] 2 U; jx y j = r g) =

jf[x; y ] j [x; y ] 2 U; jx y j = r gj jU j Our universal set, jU j = 36, by Rule of Pro duct. Now we need to count the size of f[x; y ] j [x; y ] 2 U; jx y j = r g, i.e., the numb er of rolls for which the di erence of two dice is r. Recall r 2 f 0 ; : : : ; 5 g. Let's start at ve and work our way down. { There are two rolls for which the absolute value of the di erence will b e 5 - (6,1), and (1,6). Therefore, P (X ^1 (5)) = 2 =36. { Similarly, there are four rolls for which 4 will b e the absolute value of the di erence - (2,6), (6,2), (1,5), and (5,1). Therefore, P (X ^1 (4)) = 4 =36. { Continuing, we nd that there are 6 rolls such that 3 is the absolute value of the di erence, 8 such that 2 is the absolute value of the di erence, 10 such that 1 is absolute value of the di erence and 6 such that 0 is the absolute value of the di erence. Their resp ective probability distribution functions are

P (X ^1 (3)) = 6 = 36 P (X ^1 (2)) = 8 = 36 P (X ^1 (1)) = 10 = 36 P (X ^1 (0)) = 6 = 36 :