Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(d) We can use the same approach to estimate probabilities, when calculating them analytically is either too tedious (or impossible). This approach is often used

image text in transcribed

(d) We can use the same approach to estimate probabilities, when calculating them analytically is either too tedious (or impossible). This approach is often used for plotting the performance of simulated systems. For instance, for realizations X1,X2,....Xm, the probability estimate of P(X > is simply the number of times Xi > b, divided by m. The code framework below generates numtrials realizations of a Poisson(a) random vari able, estimates the probability P(X > using up to the mth realization for m from 1 to numtrials, and plots the resulting sequence of probability estimates as well as the exat probability. Your job is to fill in the code needed to generate the estimate the probability as well as calculate the exact probability Parameters numtrials-1000 alpha 4 %Generate Poisson(alpha) random variables x random ('Poisson' ,alpha, numtrials,1) %Estimate P(X > b] probestimate zeros (1,numtrials); for m1:numtrials probestimate (m) . %% Your code for calculating (1) * (number of times X-i > b) end %Calculate P(X > b] exactly exactprob . %% Your code for calculating P(X > b] exactly %Plot hold off, plot(1:numtrials,probestimate) hold on, plot(1:numtrials, exactprob*ones (1,numtrials) 'r--') xlabel('Number of Trials') ylabel('Probability') legend 'Probability Estimate, 'Exact Probability") Then, for numtrials-1000, -4, and b-3, generate and turn i.. plots of the probability estimate. (If you don't want to print out your entire code as part of your homework, you can just write the relevant lines of code that you wrote directly on the graph print out.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

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

Database Programming Languages 12th International Symposium Dbpl 2009 Lyon France August 2009 Proceedings Lncs 5708

Authors: Philippa Gardner ,Floris Geerts

2009th Edition

3642037925, 978-3642037924

More Books

Students also viewed these Databases questions