/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q.6.9 Consider a directory of classifi... [FREE SOLUTION] | 91影视

91影视

Consider a directory of classified advertisements that consists of m pages, where m is very large. Suppose that the number of advertisements per page varies and that your only method of finding out how many advertisements there are on a specified page is to count them. In addition, suppose that there are too many pages for it to be feasible to make a complete count of the total number of advertisements and that your objective is to choose a directory advertisement in such a way that each of them has an equal chance of being selected.

(a) If you randomly choose a page and then randomly choose an advertisement from that page, would that satisfy your objective? Why or why not? Let n(i) denote the number of advertisements on page i, i = 1, ... , m, and suppose that whereas these quantities are unknown, we can assume that they are all less than or equal to some specified value n. Consider the following algorithm for choosing an advertisement.

Step 1. Choose a page at random. Suppose it is page X. Determine n(X) by counting the number of advertisements on page X.

Step 2. 鈥淎ccept鈥 page X with probability n(X)/n. If page X is accepted, go to step 3. Otherwise, return to step 1.

Step 3. Randomly choose one of the advertisements on page X. Call each pass of the algorithm through step 1 an iteration. For instance, if the first randomly chosen page is rejected and the second accepted, then we would have needed 2 iterations of the algorithm to obtain an advertisement.

(b) What is the probability that a single iteration of the algorithm results in the acceptance of an advertisement on page i?

(c) What is the probability that a single iteration of the algorithm results in the acceptance of an advertisement?

(d) What is the probability that the algorithm goes through k iterations, accepting the jth advertisement on page i on the final iteration?

(e) What is the probability that the jth advertisement on page i is the advertisement obtained from the algorithm?

(f) What is the expected number of iterations taken by the algorithm?

Short Answer

Expert verified

a) The advertisement on the second page has a considerably higher chance of being chosen.

b) The probability of an advertisement on a page being accepted after a single iteration of the algorithm isn(i)mn

c) The probability that an advertisement will be accepted after a single iteration of the algorithm isi=1Mn(i)mn

d) The probability that the algorithm goes through k iterations before accepting the advertisement on page i on the final iteration is1i=1mn(i)mn1mn

e) The probability that the Jthadvertisement on page i is the advertisement obtained by the method is 1mn

f)mni=1mn(i)number of iterations taken by the algorithm.

Step by step solution

01

Part (a) Step 1: To find

The higher the probability that the advertisement will be chosen.

02

Part (a) Step 2: Explanation

Consider a classified advertisement directory with m pages, where m is a very large number. Assuming that the quantity of adverts per page varies, the only way to determine how many advertisements are on a given page is to count them. Furthermore, imagine there are too many pages for a comprehensive count of the whole number of advertisements to be possible, and the goal is to select a directory advertisement in such a way that each of them has an equal probability of being chosen. Let nisignify the number of advertisements on page i, and i=1,.....,mdenote the number of advertisements on page i. Assuming that these values are unknown, we can assume that they are all less than or equal to n.

03

Part (a) ; Step 3: Calculation

As a result, we were unable to achieve our goal because advertisements in this scenario do not have equal chances of being chosen.

Assume that we only have two pages, one of which contains a million adverts and the other of which contains only one advertisement.

As a result, it is evident that an advertisement on the second page has a significantly higher chance of being chosen than a specific one on the first page.

As a result, the advertisement on the second page has a significantly higher chance of being chosen.

04

Part (b) - Step 4: To find

The probability that an advertisement on a page will be accepted after a single iteration of the algorithm.

05

Part (b) - Step 5: Explanation

Consider the provided data. First, we must choose the page i; the probability for this test is 1m

Accept page i now, and the probability is n(i)n

So the necessary probability is probability=P(Chosepagei)P(Accepypagei)P=1mn(i)nP=n(i)mn

As a result, the probability of an advertisement on page acceptance after a single iteration of the algorithm isP=n(i)mnThe probability that an advertisement on a page will be accepted after a single iteration of the algorithm.

06

Part (c) - Step 6 : To find

The probability that an advertisement will be accepted after a single iteration of the algorithm.

07

Part(c) - Step 7: Explanation

Consider the following query:

Apply the law of total probability to the fact that a page must be selected.

As a result, the probability that a single iteration will result in acceptance is.probability=i=1mP(chosepagei)P(Acceptpagei)

Now substitute the value

P=i=1MP1mn(i)nP=i=1Mn(i)mn

Therefore the probability that an advertisement will be accepted after a single iteration of the algorithm is P=i=1Mn(i)mn

08

Part (d) - Step 8: To find

The probability that the algorithm goes through k iterations before accepting the jth ad on page i on the final iteration.

09

Part (d) - Step 9: Explanation

Consider the give information,

Firstly, k-1 iterations had to result with no acceptance.

So, we have to accept ithpage in the Kthiteration and choose jthadvertisement.

Thus probability is

P=1i=1m1mn(i)nk11mn(i)n1n(i)P=1i=1m1mn(i)nk11mnP=1i=1mn(i)mn1mn

Hence The probability that the algorithm goes through k iterations before accepting the advertisement on page i on the final iteration isP=1i=1mn(i)mn1mn

10

Part (e) - Step 10: To find

The probability that thejthadvertisement on page i is the advertisement obtained from the algorithm.

11

Part (e) - Step 11: Explanation

Consider the question,

To get the jthadvertisement on page i, we need to select the page i randomly, accept that page and select the jthadvertisement.

So the probability is,

role="math" localid="1647491134996" P=1mn(i)n1n(i)P=1mn

The probability does not depend upon the number of the advertisement on the certain page.

Therefore,1mnis the probability that the jthadvertisement on page i is the advertisement obtained from the algorithm.

12

Part (f) - Step 12: To find

The number of iterations that the algorithm goes through.

13

Part (f) - Step 13: Explanation

Consider the given information,

The random variable Y indicates how many iterations are required to obtain an advertising.

So,

We know that

Y~Geomi=1m1mn(i)n

Calculate the mean E(Y)=1P

role="math" localid="1647491726054" E(Y)=1i=1m1mn(i)nE(Y)=1i=1mm(i)mnE(Y)=11mni=1mn(i)

So number of iteration is

E(Y)=mni=1mn(i)

Hencemni=1mn(i)number of iterations taken by the algorithm.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with 91影视!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Let X1,...,Xn be independent and identically distributed random variables having distribution function F and density f. The quantity MK[X(1)+X(n)]/2, defined to be the average of the smallest and largest values in X1,...,Xn, is called the midrange of the sequence. Show that its distribution function is FM(m)=nmq[F(2mx)F(x)]n1f(x)dxuncaught exception: Http Error #500

in file: /var/www/html/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php line 68
#0 /var/www/html/integration/lib/php/Boot.class.php(769): com_wiris_plugin_impl_HttpImpl_1(Object(com_wiris_plugin_impl_HttpImpl), NULL, 'http://www.wiri...', 'Http Error #500') #1 /var/www/html/integration/lib/haxe/Http.class.php(532): _hx_lambda->execute('Http Error #500') #2 /var/www/html/integration/lib/php/Boot.class.php(769): haxe_Http_5(true, Object(com_wiris_plugin_impl_HttpImpl), Object(com_wiris_plugin_impl_HttpImpl), Array, Object(haxe_io_BytesOutput), true, 'Http Error #500') #3 /var/www/html/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php(30): _hx_lambda->execute('Http Error #500') #4 /var/www/html/integration/lib/haxe/Http.class.php(444): com_wiris_plugin_impl_HttpImpl->onError('Http Error #500') #5 /var/www/html/integration/lib/haxe/Http.class.php(458): haxe_Http->customRequest(true, Object(haxe_io_BytesOutput), Object(sys_net_Socket), NULL) #6 /var/www/html/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php(43): haxe_Http->request(true) #7 /var/www/html/integration/lib/com/wiris/plugin/impl/RenderImpl.class.php(268): com_wiris_plugin_impl_HttpImpl->request(true) #8 /var/www/html/integration/lib/com/wiris/plugin/impl/RenderImpl.class.php(307): com_wiris_plugin_impl_RenderImpl->showImage('587f0c781406aea...', NULL, Object(PhpParamsProvider)) #9 /var/www/html/integration/createimage.php(17): com_wiris_plugin_impl_RenderImpl->createImage('" width="0" height="0" role="math">FM(m)=nmq[F(2mx)F(x)]n1f(x)dxuncaught exception: Http Error #500

in file: /var/www/html/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php line 68
#0 /var/www/html/integration/lib/php/Boot.class.php(769): com_wiris_plugin_impl_HttpImpl_1(Object(com_wiris_plugin_impl_HttpImpl), NULL, 'http://www.wiri...', 'Http Error #500') #1 /var/www/html/integration/lib/haxe/Http.class.php(532): _hx_lambda->execute('Http Error #500') #2 /var/www/html/integration/lib/php/Boot.class.php(769): haxe_Http_5(true, Object(com_wiris_plugin_impl_HttpImpl), Object(com_wiris_plugin_impl_HttpImpl), Array, Object(haxe_io_BytesOutput), true, 'Http Error #500') #3 /var/www/html/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php(30): _hx_lambda->execute('Http Error #500') #4 /var/www/html/integration/lib/haxe/Http.class.php(444): com_wiris_plugin_impl_HttpImpl->onError('Http Error #500') #5 /var/www/html/integration/lib/haxe/Http.class.php(458): haxe_Http->customRequest(true, Object(haxe_io_BytesOutput), Object(sys_net_Socket), NULL) #6 /var/www/html/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php(43): haxe_Http->request(true) #7 /var/www/html/integration/lib/com/wiris/plugin/impl/RenderImpl.class.php(268): com_wiris_plugin_impl_HttpImpl->request(true) #8 /var/www/html/integration/lib/com/wiris/plugin/impl/RenderImpl.class.php(307): com_wiris_plugin_impl_RenderImpl->showImage('587f0c781406aea...', NULL, Object(PhpParamsProvider)) #9 /var/www/html/integration/createimage.php(17): com_wiris_plugin_impl_RenderImpl->createImage('" width="0" height="0" role="math">

FM(m)=nmq[F(2mx)F(x)]n1f(x)dxuncaught exception: Http Error #500

in file: /var/www/html/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php line 68
#0 /var/www/html/integration/lib/php/Boot.class.php(769): com_wiris_plugin_impl_HttpImpl_1(Object(com_wiris_plugin_impl_HttpImpl), NULL, 'http://www.wiri...', 'Http Error #500') #1 /var/www/html/integration/lib/haxe/Http.class.php(532): _hx_lambda->execute('Http Error #500') #2 /var/www/html/integration/lib/php/Boot.class.php(769): haxe_Http_5(true, Object(com_wiris_plugin_impl_HttpImpl), Object(com_wiris_plugin_impl_HttpImpl), Array, Object(haxe_io_BytesOutput), true, 'Http Error #500') #3 /var/www/html/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php(30): _hx_lambda->execute('Http Error #500') #4 /var/www/html/integration/lib/haxe/Http.class.php(444): com_wiris_plugin_impl_HttpImpl->onError('Http Error #500') #5 /var/www/html/integration/lib/haxe/Http.class.php(458): haxe_Http->customRequest(true, Object(haxe_io_BytesOutput), Object(sys_net_Socket), NULL) #6 /var/www/html/integration/lib/com/wiris/plugin/impl/HttpImpl.class.php(43): haxe_Http->request(true) #7 /var/www/html/integration/lib/com/wiris/plugin/impl/RenderImpl.class.php(268): com_wiris_plugin_impl_HttpImpl->request(true) #8 /var/www/html/integration/lib/com/wiris/plugin/impl/RenderImpl.class.php(307): com_wiris_plugin_impl_RenderImpl->showImage('587f0c781406aea...', NULL, Object(PhpParamsProvider)) #9 /var/www/html/integration/createimage.php(17): com_wiris_plugin_impl_RenderImpl->createImage('" width="0" height="0" role="math">FM(m)=n-m[F(2mx)F(x)]n1f(x)dx.


Let Z1,Z2......Znbe independent standard normal random variables, and let Sj=i=1jZi

(a) What is the conditional distribution of Sn given that Sk=y,for k = 1, ... , n?

(b) Show that, for 1 鈥 k 鈥 n, the conditional distribution of SKgiven that

Sn = x is normal with mean xk/n and variance k(n 鈭 k)/n.

The joint probability density function of X and Y is given by

f(x.y)=67(x2+xy2)0<x<1,0<y<2

(a) Verify that this is indeed a joint density function.

(b) Compute the density function of X.

(c) Find P{X > Y}.

(d) Find P{Y > 1 2 |X < 1 2 }.

(e) Find E[X].

(f) Find E[Y].

In Problem 6.3, calculate the conditional probability mass function of Y1given that

(a) localid="1647528969986" Y2=1;

(b) localid="1647528979412" Y2=0.

The 鈥渞andom鈥 parts of the algorithm in Self-Test Problem 6.8 can be written in terms of the generated values of a sequence of independent uniform (0, 1) random variables, known as random numbers. With [x] defined as the largest integer less than or equal to x, the first step can be written as follows:

Step 1. Generate a uniform (0, 1) random variable U. Let X = [mU] + 1, and determine the value of n(X).

(a) Explain why the above is equivalent to step 1 of Problem 6.8. Hint: What is the probability mass function of X?

(b) Write the remaining steps of the algorithm in a similar style

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.