Can the Weak Law of Large Numbers Effectively Estimate Log 2?

Click For Summary

Homework Help Overview

The problem involves estimating the value of log 2 using the weak law of large numbers and a uniform random variable generator. The original poster attempts to approximate log 2 through integration and simulation, seeking to understand the estimation error and confidence intervals related to their results.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the method of generating a random variable with an expected value of log 2 and the process of averaging samples to approximate this value. Questions arise regarding the use of a calculator for approximation and the definition of "error of estimation." There is also inquiry into the calculation of a 95% confidence interval.

Discussion Status

Some participants express uncertainty about the clarity of the problem statement and the steps taken by the original poster. There is acknowledgment that the original poster has made progress in generating estimates and comparing them, but further clarification on the confidence interval is needed. No explicit consensus has been reached regarding the correctness of the original poster's approach.

Contextual Notes

Participants note the absence of a confidence interval calculation and question the appropriateness of using a calculator for approximation. The discussion reflects a mix of interpretations about the problem requirements and the steps taken by the original poster.

Artusartos
Messages
236
Reaction score
0

Homework Statement


Recall that log 2 = \int_0^1 1/(x+1) dx. 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.

Homework Equations


The Attempt at a Solution



My answer:

\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))

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:
Physics news on Phys.org
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.
 
haruspex said:
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.

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?
 
Artusartos said:
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?

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.
 
haruspex said:
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.

I'm numbering them according to the numbering that you gave in your first post.
 
Artusartos said:
I'm numbering them according to the numbering that you gave in your first post.
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.
 
haruspex said:
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.

By the way, what does "OP" mean?
 
Artusartos said:
By the way, what does "OP" mean?
Original Post (i.e. the start of the thread)
 
haruspex said:
Original Post (i.e. the start of the thread)

Ok thanks :)
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
Replies
23
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 105 ·
4
Replies
105
Views
11K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 27 ·
Replies
27
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
12
Views
2K