Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

In order to complete this question, we will need to use a fundamental theorem in probabilty the- ory known as the(Weak) Law of Large Numbers(WLLN).

image text in transcribed

In order to complete this question, we will need to use a fundamental theorem in probabilty the- ory known as the(Weak) Law of Large Numbers(WLLN). We will use this important theorem throughout the course to approximate probabilities (or other quantities) that are otherwise difficult to calculate theoretically.

A simplified version of the theorem goes as follows. Assume we are interested in computing the probability of some eventAin the sample space ? that is otherwise hard (or possibly impossible) to calculate theoretically. We may approximate this probability via a simulation in the following way:

? Generate a large number of samples of the data of interest:x1, x2, ..., xN

?1, xi?A

? LetIA(xi) =0,otherwise

2

?P(A)??Ni=1IA(xi)N

For example, in the scriptCoin Flip Example - R Code.Ron Canvas, we want to compute the probability of flipping heads (H) for a coin with unknown probabilityP(H). We defineA={H}and we approximate this probability by simulating a large number of coin flipsxi? {H,T}for

i= 1,...,N, and approximatingP(H)??Ni=1IA(xi). The latter is also known as a(Simple)N

Monte Carlo Approximation. Note that the larger the sample sizeNis, the more accurate the approximation will be.

Using this simulation approximation approach for a probability of interest, you are required to approximate the probabilities of interest of the following scenario. Assume that you roll afair8-faced die 20 times. You want to approximate the probability that at leastiof the rolls have a value of 6 or greater, given that you know at leastjof the rolls have a value of 4 or greater, for every combination ofi= 12,13,14 andj= 8,9,10,11,12.

For notational convenience, define the probability of interest byp(i,j) (i.e., we are interested in 35 = 15 different probabilities).

Your tasks for this question are the following: (a) Write a simple pseudo-code of the steps to approximatep(i,j) for a fixediand fixedj.[5

marks]

(b) Write your ownRcode (or code in the language of your choice) to implement your pseudo- code in (a) to approximate all probabilitiesp(i, j) fori= 12,13,14 andj= 8,9,10,11,12 via simulation. Note that you must include yourRcode at the very end of your assignment as an Appendix.[10 marks]

(c) Report your numerical values obtained for the approximation of the probabilitiesp(i,j) fori= 12,13,14 andj= 8,9,10,11,12.[5 marks]

(Hint: It is recommended to go through the entire scriptCoin Flip Example - R Code.Ron Canvas to make sure you understand this concept to approximate probabilities. In particular, note that we want to approximate a conditional probability here.)

(When answering the questions, writing down the final answer will not be sufficient to receive full marks. Please show all calculations unless otherwise specified. Also define any events and notation that you use in your solutions.)

image text in transcribedimage text in transcribed
Problem 5 [20 marks] In order to complete this question, we will need to use a fundamental theorem in probabilty the- ory known as the (Weak) Law of Large Numbers (WLLN). We will use this important theorem throughout the course to approximate probabilities (or other quantities) that are otherwise difcult to calculate theoretically. A simplied version of the theorem goes as follows. Assume we are interested in computing the probability of some event A in the sample space S] that is otherwise hard (or possibly impossible) to calculate theoretically. We may approximate this probability via a simulation in the following way: I Generate a large number of samples of the data of interest: :1: 1, 3:2, ..., :1: N 1,325614 0, otherwise 0 Let 1,4(33): { N . . 13(14):: 24-11' Aim For example, in the script Coin Flip Example - R Code . R on Canvas, we want to compute the probability of ipping heads (H) for a coin with unknown probability P(H). We dene A = {H} and we approximate this probability by simulating a large number of coin ips 33,,- E {H ,T} for i = 1, . ..,N, and approximating P(H) s\": W. The latter is also known as a (Simple) Monte Carlo Approximation. Note that the larger the sample size N is, the more accurate the approximation will be. Using this simulation approximation approach for a probability of interest, you are required to approximate the probabilities of interest of the following scenario. Assume that you roll a fair 8-faced die 20 times. You want to approximate the probability that at least i of the rolls have a value of 6 or greater, given that you know at least j of the rolls have a value of 4 or greater, for every combination of i = 12,13,14 andj = 8,9,10,11,12. For notational convenience, dene the probability of interest by p(i, j) (i.e., we are interested in 3 X 5 = 15 different probabilities). Your tasks for this question are the following: (a) Write a simple pseudo-code of the steps to approximate p(i, j) for a xed i and xed 3'. [5 marks] (b) Write your own R code (or code in the language of your choice) to implement your pseudo- code in (a) to approximate all probabilities p(i,j) for i = 12, 13, 14 and j = 8,9, 10, 11, 12 via simulation. Note that you must include your R code at the very end of your assignment as an Appendix. [10 marks] (c) Report your numerical values obtained for the approximation of the probabilities p(i, j) for i = 12,13,14 and j = 8,9,10,11,12. [5 marks] (Hint: It is recommended to go through the entire script Coin Flip Example - R Code.R on Canvas to make sure you understand this concept to approximate probabilities. In particular, note that we want to approximate a conditional probability here.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managerial Accounting Creating Value in a Dynamic Business Environment

Authors: Ronald Hilton, David Platt

10th edition

78025664, 978-0078025662

Students also viewed these Mathematics questions