Docsity

Midterm for Algorithm and Systems Analysis | CSE 21, Exams of Computer Science

Toggle sidebar
bg1
Midterm 2, CSE21, Fall 2002
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 use calculators.
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 beginning any question. You don’t
have to do the questions in order: do first whatever you find easiest. The last problem is
fairly time consuming.
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.
When a random variable of interest follows the binomial, or Poisson or normal distribu-
tion, write the distribution of the random variable. For example, write “variable Xfollows
the normal distribution with mean 100 and standard deviation 10” or “variable Xfollows
the binomial distribution b(k;n, p)”. Such notes will help you get partial credit if the final
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 specific number, calculations have to be
done. Good luck!
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Midterm for Algorithm and Systems Analysis | CSE 21 and more Exams Computer Science in PDF only on Docsity!

Midterm 2, CSE21, Fall 2002

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 use calculators. 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 beginning any question. You don’t have to do the questions in order: do first whatever you find easiest. The last problem is fairly time consuming.

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. When a random variable of interest follows the binomial, or Poisson or normal distribu- tion, 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 final 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−λ λ kk!

HOWEVER, in multiple choices that ask for the specific number, calculations have to be done.

Good luck!

Scores: To be filled in at grading time.

On Problem You got Out of

Total: 80

2 Binomial and Normal Distribution

Show the work leading to the answer. In the next presidental elections, there are three candidates: Humpty Dumpty, Donald Duck, and Buggs Bunny. A random person has 60% probability to vote for Humpty. Please answer the following problems.

  1. 3 points Imagine that in La Jolla 10,000 people voted. Using the binomial distribution, what is the probability that exactly 6,500 of the 10,000 voters voted for Humpty? (A formula is sufficient. You do not need to provide number.)
  2. (a) 3 points Using the normal distribution approximation of the binomial distribu- tion, find the probability that the number H of votes that Humpty Dumpty got is between 6000 and 6100, i.e. P (6000 ≤ H ≤ 6100)? (A formula is not sufficient. A number is needed. You should use the attached table.)

(b) 3 points Using the normal distribution approximation of the binomial distribu- tion, find P (H > 6100)? (Again, a number is needed.)

(c) 3 points Using the normal distribution approximation of the binomial distribu- tion, find P (5975 ≤ H ≤ 6050)? (A number is needed.)

3 Conditional Probability

Show the diagram outlining the probabilities in each step of the sequence of events and use it to justify your answers. There are three jars in front of you, each containing precisely 10 marbles. Specifically, jar 1 contains 5 red marbles and 5 blue marbles; jar 2 contains 8 red marbles and 2 blue marbles; and jar 3 contains 7 red marbles and 3 blue marbles. First you select one jar at random, where each jar has probability 1/3 of being selected, and then randomly select a marble x from that jar. You throw away marble x and you randomly select a second marble y from the same jar. Please answer the following questions:

  1. 7 points What is the probability that marble x is blue? Justify your answer using a diagram.
  2. 5 points Given that marble x is red, what is the probability that is was chosen from the jar 2?
  3. 7 points Given that marble x is red, what is the probability that marble y is red as well?

5 Random Variables

This problem is relatively time consuming. Consider an unfair coin (also called, biased coin) that has probability 13 to turn Heads and probability 23 to turn Tails. The coin is tossed twice. The universal set U is:

U = {HH, HT, T H, T T }

Notice that this is not an equiprobable space. Let X be the random variable that representes the number of Heads, i.e.,

X(t) =

  

0 , if t = T T, 1 , if t ∈ {HT, T H} 2 , if t = HH

and let Y be 1 if the first toss is Heads and 0 if the first toss is Tails, i.e,

Y (t) =

{ 0 , if t ∈ {T H, T T } 1 , if t ∈ {HT, HH}

  1. 2 points Calculate the probability of each outcome of U. I.e., privide

(a) P (HH) = (b) P (HT ) = (c) P (T H) = (d) P (T T ) =

  1. 3 points Calculate the distribution fX of X.
  2. 2 points Calculate the expected value E(X).
  1. 3 points Calculate the variance V ar(X).
  2. 4 points Which one of the following is the joint probability distribution hX,Y of X and Y : (a)

hX , Y X = 0 X = 1 X = 2 Y = 0 49 29 0 Y = 1 (^0 )

(b)

hX , Y X = 0 X = 1 X = 2 Y = 0 (^191919) Y = 1 (^292929)

(c)

hX , Y X = 0 X = 1 X = 2 Y = 0 0 59 0 Y = 1 (^192919)

(d)

hX , Y X = 0 X = 1 X = 2 Y = 29 0 19 0 Y = 1 69 0 0

(e) None of the above. Write the correct answer:

  1. 4 points Calculate the covariance Cov(X, Y ).