Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Due date: Friday 6/30

Final Exam – Take Home

MA 581

BU Summer 1 2023

INSTRUCTIONS

This portion of the nal exam will be due on Friday 6/30 at 11:59pm EST. You will solve the problem using both excel and theoretical work. When you are nished, email me your excel spreadsheet AND a PDF of your work.  This take-home exam should be completed individually.  That being said, I will have office hours throughout the week at which you can ask me any questions, and will be available by email as always. Additionally, this portion of the exam is open notes/course resources:  you are allowed to use the same materials you have been allowed to use in your problem sets, except other people in the course.  You will receive full credit for correctness as well as showing all your work (do not just put down the nal answer to a problem unless this is explicitly asked for). Even if you do not ultimately have the correct answer, showing your work will yield you significant partial credit. This part of the exam is out of 40 points, split evenly among the theoretical and numerical sections.

The Problem

In this problem we will explore a card-drawing simulation based on a random number of cards drawn. We will examine both the theoretical and numerical breakdowns of this experiment and synthesize our results.

1) Theoretical Section (20 points)

(a) There are 52 cards in a single deck, 13 of each suit.  For simplicity, treat an Ace with the value 1, and Jack, Queen, and King with values of 11, 12, and 13, respectively. Choose one card you would like to x for this experiment (e.g.  Queen of Spades, 3 of Diamonds, 10 of Clubs etc.), and assign to it a numerical value j = 1, 2, . . . , 52.  We will use this value as your card, wj , throughout the remainder of the experiment.

(b) Letting N ~ Binomial(n,p), draw N cards from the deck.  Let AN  be the event in which your card !j  is one of those drawn.  In this set up, what must the value of n be, and why? Use this value for all subsequent steps.

(c) Recall from week 4 of class the Indicator random variable

E (!)

for some event E . In this problem we will use the indicator r.v. AN . For a deterministic (i.e. fixed) n, write out the PMF p An (a), first defining the possible values of a.

(d) We will now consider the impact of the random parameter N on the PMF of our indicator r.v.  Compute using the Law of Total Probability the PMF p AN  (a).  Note: in part f you are asked to use the Law of Total Expectation, so make sure you are not directly applying that in this part!

(e) In our primer question in lecture 3 we studied a very similar problem, where we deter- mined that no matter how many people there were in the classroom, and no matter what number in the draw order you were, that you as an individual have a 1/52 probability of drawing the Queen of Spades.  Does our result in part d contradict our conclusion from lecture 3?  Why or why not?  Justify your answer using a few short sentences and/or mathematical statements.

(f)  Compute using the Law of Total Expectation E(AN).   Hint:   it may help rst to compute E(An) for a deterministic n.

(g) Knowing what we do about indicator random variables, does our answer in part f align with that in d?

(h) Do you nd this result interesting?  Explain what is expected and/or unexpected for you about the results of this experiment from a theoretical perspective.

2) Numerical Section (20 points)

Turn your attention to the Excel template.   We will now simulate this experiment and compare our results to the theoretical results above.  As usual, you only need to edit cells shaded yellow. NOTE: If you were unable to complete the theoretical part above, you can still do most of this part here!

(a) First input your values for n (answer in part (b) of the previous section) in cell C1, p

(probability of success for Binomial Distribution, you choose a value) in cell C2, and your card !j  (from part (a) of previous section, written as a number) in cell H2. Write down what you chose as your answer for this part.

(b) You must rst simulate N as a sum of n Bernoulli trials, with success parameter p. Perform this simulation in the yellow-shaded cells in columns A and B at the top of the spreadsheet. In column B, make sure to account for your choice of p!

(c) After completing the previous step, you should see the card draw simulation automat- ically fill itself in. Explain in words the formulas in the following cells/columns:

1)  Cells F5:F56

2)  Cells G5:G56

3)  Cell E58 (make sure to take into account the result of the simulation for N)

(d) Turn your attention to the small table in columns D,E and rows 60-62. What is this table measuring? Approximately what value should we expect (in theory) in cell E62?

(e) We will now observe the proportion of success (drawing our target card out of N ran- domly drawn cards) over the course of the 100 independent trials. Turn your attention to the yellow-shaded cells in Column C (specifically, C67:C166). In each cell, compute the proportion of success relative to the number of trials. NOTE: Column B measures the number of cumulative successes up to each trial number. In other words, it is a sum of the results of all trials up to trial k, with k 2 {1, 2, . . . , 100}. Think about how this a↵ects your formula in column C.

(f) Plot columns C and D (in rows 67 to 166) on the same line graph. Describe what you

see on the graph as the number of trials increases from 1 to 100. Hint:  observe not only the shape of the graph, but also the actual values on the vertical axis!

(g) Change your p value in cell C2. What happens to the graph? Try this for at least three

different p values.

(h) What Law/Theorem are we attempting to invoke here? State not only the law, but also how our experiment satisfies its hypotheses. (If you are unfamiliar with this terminol-ogy, a classic example is the Pythagorean theorem: the hypothesis of the theorem is that we are working with a right triangle, and then in any case in which we have this scenario, the relationship a2 + b2  = c2  must hold.)

(i) Based on all your results from this section, would you say that with this spreadsheet setup our numerical results align with our theoretical? Why or why not? What could we do better in order to best align with our theoretical work?