Question on HW2.1
I was, out of curiosity, trying to derive an exact theoretical expression for the expected value of v_min, and this is what I got (apologies for the poor typesetting):
E( #heads_min ) = sum from i=0 to i=10 ( P(#heads_min = i) * i ) P(#heads_min = i) = 1000 * P( one gets i intersect the others get >= i) for which *1000 means that out of the 1000 trials, I choose one trial to be the minimum head trial. P( one gets i intersect the others get >= i) = P( one gets i ) * P(others get >= i) = p(i, 10, 0.5) * [1  F(i1, 10, 0.5)] ^ 999 for which p is the probability mass function and F is the cumulative mass function, with parameters (number successes, total number, prob. of success). I used i1 for F since >= i includes i itself. and this expression yielded the result E( #heads_min ) = 3.6814, and expected v_min is thus 0.36814, which is incorrect. Would anyone please point to me where my mistake is? I would really really appreciate it! Here is the R code I used for the calculation: phmin = function(i) { u = 0.5 # probability of head N = 10 # number of flips per trial m = 1000 # number of trials one_min = dbinom(i, N, u) others_more = pbinom(i1, N, u, lower.tail = FALSE) ^ (m1) return(1000 * one_min * others_more) } ivals = (0:10) expect_hmin = sum(phmin(ivals) %*% ivals) expect_hmin / 10 
Re: Question on HW2.1
Quote:

Re: Question on HW2.1
Thank you so much, this clears it up exactly and I changed it and got the correct answer! I'll keep working.

All times are GMT 7. The time now is 03:21 AM. 
Powered by vBulletin® Version 3.8.3
Copyright ©2000  2022, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. AbuMostafa, Malik MagdonIsmail, and HsuanTien Lin, and participants in the Learning From Data MOOC by Yaser S. AbuMostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.