Roger reviews movies and gives each movie independently either a thumbs up with probability p or a thumbs down with probability q = 1 − p . Let α be the expected number of reviews before both at least n thumbs ups and at least m thumbs downs are given. Let β be the expected number of reviews before either at least n thumbs ups or at least m thumbs downs are given.
With n = 3 and m = 7 , find the value of p for which the difference α − β is the smallest, and give your answer as 1 0 0 0 p , rounded to nearest integer.
You'll probably need to use a computer and write some code. Try reusing result for α when determining β .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
This is merely a sketch of a solution with some notes.
Roger starts reviewing: one, two, three ... Now jump ahead to the review number n + m . Either exactly n thumbs ups were given (so exactly m thumbs downs as well) or there were n ′ > n ups (so m ′ < m downs) or there were n ′ < n ups (so m ′ > m downs). It feels right to condition on this outcome.
E [ R ] = E [ R ∣ n ′ = n ] ⋅ P { n ′ = n } + E [ R ∣ n ′ > n ] ⋅ P { n ′ > n } + E [ R ∣ n ′ < n ] ⋅ P { n ′ < n }
Express expected number of reviews R by summing binomial probabilities. Simplify as much as you can. Eventually a summing term remains that can be summed up in a closed form but as a hypergeometric function. I myself left the term as a sum and evaluated it numerically within the ternary search algorithm for the minimum of α − β .
Problem Loading...
Note Loading...
Set Loading...
Let M a , b be the expected number of reviews until both a "up"s and b "down"s have been received. Then M a , b M a , 0 M 0 , b M 0 , 0 = 1 + p M a − 1 , b + q M a , b − 1 = 1 + p M a − 1 , 0 + q M a , 0 = 1 + p M 0 , b + q M 0 , b − 1 = 0 a , b ≥ 1 a ≥ 1 b ≥ 1 Thus we have M a , 0 = p a M 0 , b = q b a , b ≥ 0 On the other hand, let N a , b be the expected number of reviews until either a "up"s or b "down"s have been received. Then N a , b = 1 + p N a − 1 , b + q N a , b − 1 a , b ≥ 1 while N a , 0 = N 0 , b = 0 a , b ≥ 0 If we let K a , b = M a , b − N a , b , then K a , b K a , 0 K 0 , b K 0 , 0 = p K a − 1 , b + q K a , b − 1 = p a = q b = 0 a , b ≥ 1 a ≥ 1 b ≥ 1 It is easy enough to iterate these equations to obtain α − β = K 3 , 7 = p ( 1 − p ) 3 − 1 0 p + 4 2 0 p 4 − 1 5 1 2 p 5 + 2 5 2 0 p 6 − 2 4 0 0 p 7 + 1 3 5 0 p 8 − 4 2 0 p 9 + 5 6 p 1 0 and this expression is minimized when p = 0 . 3 2 1 7 5 2 , making the answer 3 2 2 .
It is worth noting that we can find the generating function of the double sequence K a , b , with a , b ≥ 0 ∑ K a , b x a y b = 1 − p x − q y 1 [ p ( 1 − x ) 2 x ( 1 − p x ) + q ( 1 − y ) 2 y ( 1 − q y ) ]