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

In summary, the author attempted to solve a homework equation and found that by using a uniform(0,1) generator, they approximate log2. They also calculated the mean of a sample of 10,000 and found that it was close to the actual mean.
  • #1
Artusartos
247
0

Homework Statement


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.

Homework Equations


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:
Physics news on Phys.org
  • #2
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.
 
  • #3
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?
 
  • #4
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.
 
  • #5
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.
 
  • #6
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.
 
  • #7
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?
 
  • #8
Artusartos said:
By the way, what does "OP" mean?
Original Post (i.e. the start of the thread)
 
  • #9
haruspex said:
Original Post (i.e. the start of the thread)

Ok thanks :)
 

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

What is the Weak Law of Large Numbers?

The Weak Law of Large Numbers is a theorem in probability theory that states that as the number of independent trials increases, the average of the outcomes will converge to the expected value. In simpler terms, it is the idea that the more times you repeat an experiment, the closer your average result will be to the true probability.

How is the Weak Law of Large Numbers different from the Strong Law of Large Numbers?

The Weak Law of Large Numbers is a weaker version of the Strong Law of Large Numbers. While the Weak Law only guarantees convergence of the average, the Strong Law guarantees convergence of every single outcome. This means that the Strong Law is a stronger and more precise statement, but it also has more stringent requirements for its application.

Can the Weak Law of Large Numbers be applied to any type of experiment?

Yes, the Weak Law of Large Numbers can be applied to any experiment that meets the necessary conditions, such as having independent trials and a finite expected value. However, it is important to note that the theorem only guarantees convergence in probability, meaning that there is still a small chance that the average may deviate from the expected value.

What are some real-world applications of the Weak Law of Large Numbers?

The Weak Law of Large Numbers has many practical applications in fields such as finance, economics, and statistics. For example, it is used in stock market analysis to predict future trends based on past data, and in polling and surveys to estimate the opinions of a larger population based on a smaller sample size.

What are the limitations of the Weak Law of Large Numbers?

While the Weak Law of Large Numbers is a powerful and useful theorem, it does have some limitations. One major limitation is that it only applies to independent trials, meaning that the outcomes of each trial must not influence the outcomes of the other trials. In addition, the theorem only guarantees convergence in probability, not absolute certainty, so there is always a small chance of error.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
598
Replies
23
Views
1K
  • Calculus and Beyond Homework Help
Replies
27
Views
2K
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
705
  • Calculus and Beyond Homework Help
Replies
1
Views
983
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
607
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
897
Back
Top