1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Weak Law of Large Numbers

  1. Jan 29, 2013 #1
    1. The problem statement, all variables and given/known data
    Recall that [itex]log 2 = \int_0^1 1/(x+1) dx[/itex]. Hence, by using a uniform(0,1) generator, apprximate log 2. Obtain an error of estimation in terms of a large sample 95% confidence interval. If you have access to the statistical package R, write an R function for the estimate and the error of estimation. Obtain your estimate for 10,000 simulations and compare it to the true value.




    2. Relevant equations



    3. The attempt at a solution

    My answer:

    [tex]\int_0^1 1/(x+1) dx = (1-0)\int_0^1 1/(x+1) dx/(1-0) = \int_0^1 1/(x+1) f(x) dx = E(1/(x+1))[/tex]

    Where f(x)=1, 0<x<1

    And then I calculated log 2 from the calculator and got 0.6931471806

    From R, I got 0.6920717

    So, from the weak law of large numbers, we can see that the sample mean is approaching the actual mean as n gets larger.

    My Question:

    Is my answer correct? Can I use the calculator to approximate log 2? If I shouldn't be using it...the problem that I'm having is if I try to compute the expected value, I get log 2. So it doesn't help much. Can anybody give me a hint if my answer is wrong? By the way, I know I didn't compute the confidence interval yet...but I'm just asking if this portion of the problem is correct.

    Thanks in advance
     
    Last edited: Jan 29, 2013
  2. jcsd
  3. Jan 29, 2013 #2

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    I'm not certain I understand what you're being asked to do. What is "an error of estimation"? Should that be "an estimate of error"? Reading what you've actually done doesn't make it any clearer.
    I think the question is asking you to:
    1. Figure out how to generate random variable with an expected value of log2 from one that's uniform in (0,1). You've done that.
    2. Obtain an approximate value for log2 by averaging many samples of this r.v. Did you do that? You mention "approximating" log 2 by using a calculator, which I would have thought was far more accurate than they intend.
    3. Given the size of the sample, estimate the 95% confidence interval for the value approximated by sampling. I see no attempt to do that.
     
  4. Jan 29, 2013 #3
    Yes, I didn't do 3 yet. I want to know if I did 2 correctly. I used R to see what the mean would be for a sample size of 10,000. I then compared that with what I got from the calculator. Do you think that's right?
     
  5. Jan 29, 2013 #4

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Not sure how you're numbering sections. You appear to have done the last part, "Obtain your estimate for 10,000 simulations and compare it to the true value", and that's fine. It's not clear to me what they want you to write down to demonstrate that you compared them.
     
  6. Jan 29, 2013 #5
    I'm numbering them according to the numbering that you gave in your first post.
     
  7. Jan 29, 2013 #6

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Ah yes - sorry.
    Then yes, what you have done for 1 and 2 looks fine, but none of that involved checking with a calculator. That's the last part of the OP, which I did not get as far as assigning a number to.
     
  8. Jan 29, 2013 #7
    By the way, what does "OP" mean?
     
  9. Jan 29, 2013 #8

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Original Post (i.e. the start of the thread)
     
  10. Jan 29, 2013 #9
    Ok thanks :)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Weak Law of Large Numbers
  1. Large number (Replies: 4)

Loading...