Jump to content

Talk:Law of large numbers

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Refutation?

[edit]

Let's say we do coin tosses and let's say we assume P(head) = 0.1 and P(tail) = 0.9 as probabilities. That's a legitimate probability function according to Kolmogorov. But now the LLN becomes obviously false. So there must be some premise of LLN that forbids this constellations. Which one is it? — Preceding unsigned comment added by Rs220675 (talkcontribs) 19:47, 20 February 2021 (UTC)[reply]

→I don't understand your message, but why would the LLN "become obviously false"? if you toss your coin an high number of times, the number of tail divided by the number of toss may lean toward 0.9, i don't understand your problem with that? — Preceding unsigned comment added by 2A01:CB11:88F:A800:6CDA:5A2C:D4F2:CDC (talk) 11:32, 30 October 2021 (UTC)[reply]

Strong vs Weak

[edit]

The section on the strong law gets excessively wordy describing exactly what it means to be strong (in an unclear way, since a theorem can be strong when the hypothesis is weaker, (so that it implies the weak one and applies to more cases) or when both the hypothesis and conclusion are stronger, as is here.) I think it would be better to rewrite most of that verbage, specifically:

"The strong law implies the weak law but not vice versa, when the strong law conditions hold the variable converges both strongly (almost surely) and weakly (in probability). However the weak law may hold in conditions where the strong law does not hold and then the convergence is only weak (in probability)."

I suggest instead a general explanation of strong vs weak theorems be made in theorem and linked to from here (and perhaps any other place that uses the terms). I'll be adding a talk over there about that.

This section also gets wordy on another count, as it appears some are arguing as to whether the strong and weak forms are possibly equivalent. There are examples of probability distributions for which the weak law applies, but not the strong law.[1] As such, I suggest the following be removed:

To date it has not been possible to prove that the strong law conditions are the same as those of the weak law.

as well as the clarification needed prior, and the citation needed after. Is the StackExchange conversation a sufficient reference to make such an edit?

— Preceding unsigned comment added by Jandew (talkcontribs) 22:49, 23 November 2016 (UTC)[reply]

References

  1. ^ "Sequence satisfies weak law of large numbers but doesn't satisfy strong law of large numbers". Mathematics StackExchange. Retrieved 23 November 2016.

Possible merger?

[edit]

Should Borel's law of large numbers get merged into this article and made a redirect page? Michael Hardy (talk) 16:04, 10 January 2008 (UTC)[reply]

Yes, certainly. — ciphergoth 07:47, 21 May 2008 (UTC)
The problem with this is to make it clear exactly what "Borel's law of large numbers" is in the context of the larger article, since presumably Borel's law of large numbers is notable enough to br mention specifically. Melcombe (talk) 09:43, 16 June 2008 (UTC)[reply]

correction of misdirected merger proposal from March2008. Melcombe (talk) 13:11, 12 May 2008 (UTC) -- and copying from Talk:Law of Large Numbers corrected again — ciphergoth 07:44, 21 May 2008 (UTC)[reply]

Is there any information over at Statistical regularity that might be of use? I added a {{mergeto}} tag to that article. If there is nothing worthwhile then perhaps simply replace it with a redirect?—Preceding unsigned comment added by User A1 (talkcontribs) 02:43, 30 March 2008
It looks to me very much like the two articles are covering the same ground, so yes, a merger makes sense to me. I can't see any material in that article that needs to be copied into this one. — ciphergoth 07:44, 21 May 2008 (UTC)

Agreed. In fact the other article should probably simply be removed. OliAtlason (talk) 15:28, 21 May 2008 (UTC)[reply]

I second that. Just replace Statistical regularity with a redirect to LLN. Aastrup (talk) 13:18, 12 June 2008 (UTC)[reply]
I think that there may have been an intention that Statistical regularity should be part of a collection of non-mathematically-formal articles partly related to gambling, as in mention of Gambler's fallacy. Melcombe (talk) 09:47, 16 June 2008 (UTC)[reply]
I've read a bit on the subject and it would seem that's it's an umbrella term. I invite you to read Whitt, Ward (2002) Stochastic-Process Limits, An Introduction to Stochastic-Process Limits and their Application to Queues, Chapter 1: Experiencing Statistical Regularity. The first chapter is available online [1]. Aastrup (talk) 22:14, 16 June 2008 (UTC)[reply]
And I've changed the Statistical regularity article. —Preceding unsigned comment added by Aastrup (talkcontribs) 22:20, 16 June 2008 (UTC)[reply]

Interpreting

[edit]

Consider the paragraph:

Interpreting this result, the weak law essentially states that for any nonzero margin specified, no matter how small, with a sufficiently large sample there will be a very high probability that the average of the observations will be close to the expected value, that is, within the margin.

This is simply explaining in words what convergence in probability is. I don't consider it useful. I'll remove it shortly if no-one objects. Aastrup (talk) 22:17, 23 July 2008 (UTC)[reply]

It is true that it is simply an explanation of convergence in probability in words. However, this may be very insightful to those who are not well versed in probability theory or even mathematical formalism. The section that includes this paragraph would be substantially poorer without this explanation. I suggest leaving it in. OliAtlason (talk) 07:34, 24 July 2008 (UTC)[reply]
I think any time you can add text interpretation to a math article it is hugely helpful, even if those who already know it all find it just extra words. PDBailey (talk) 22:01, 24 July 2009 (UTC)[reply]
Generally I agree. But in this instance I don't. We are talking about convergence. The sample average converges towards the mean, this should simply be interpreted as the distance between the two grows smaller as the number in the sample increases and tend to infinity. That we are dealing with two forms of convergence and that thier exact definitions are different from oneanother is not of interest to the non-mathematician. And if the reader is interested in the exact difference between the two then there's an article about convergence of random variables. Aastrup (talk) 08:50, 25 July 2009 (UTC)[reply]
And it is repetitive. Convergence in probability is stated in words twice. It would be neater if it just said Convergence in probability| and anybody who didn't know the term could go there and learn. Aastrup (talk) 08:55, 25 July 2009 (UTC)[reply]
I added ε to clarify that it was the margin to which the paragraph referred. I did so because, despite knowing the LLN and its mathematical formulation, it wasn't immediately clear to me what margin was being discussed. TryingToUnderstand11 (talk) 05:22, 20 August 2021 (UTC)[reply]

Citations

[edit]

I removed the annoying references/citations tag and added a few references. Should there be more citations? Should I have left the tag where it was? I dont think so. Aastrup (talk) 19:44, 24 July 2009 (UTC)[reply]

What if there is no expected value?

[edit]

From reading this article many can get the wrong impression that a sequence of averages almost surely converges, and converges to the expected value. But in reality the law of large numbers only works when expected value of the distribution exists, and there are many heavy-tailed distributions which don't have an expected value. Take, for example, the Cauchy distribution. A sequence of sample means won't converge, because the average of n samples drawn from the Cauchy distribution has *exactly* the same distribution as the samples. I think the article definitely needs a section about this misconception with examples and a neat graph of diverging sequence of averages, but as you might see, my English is too bad for writing it myself. --87.117.185.161 (talk) 12:53, 21 November 2009 (UTC)[reply]

A Proof of the Strong Law of Large Numbers

[edit]

There is a proof of the Strong Law of Large Numbers that is accessible to students with an undergraduate study of measure theory, its established by applying the dominated convergence theorem to the limit of indicator functions, and then using the Weak Law of Large Numbers on the resulting limit of probabilities. Would this be appropriate for inclusion with the group of articles on the Laws of Large Numbers?Insightaction (talk) 21:17, 20 January 2010 (UTC)[reply]

Image

[edit]

I have created and uploaded an image similar to the current image, but in SVG format instead of GIF and with source code available. It also looks a little different and has different data (new data may be generated by anyone with the inclination using my provided source code (or their own)). I would like to propose that we switch to my image, File:Largenumbers.svg. --Thinboy00 @175, i.e. 03:11, 3 February 2010 (UTC)[reply]

Nice job! --Steve (talk) 06:39, 3 February 2010 (UTC)[reply]
By the way, I was motivated to make one myself, so I just put in the animated gif of red and blue balls. I think my animated one and your non-animated one are complementary and both should be in the article...different readers may respond better to one or the other. Let me know if you have any comments or suggestions! :-) --Steve (talk) 08:54, 27 February 2010 (UTC)[reply]

Merge suggestion

[edit]

It has been suggested at the Wikipedia:Proposed mergers page, that Law of averages be merged with Law of large numbers (LLN). Please state your comments regarding this action. --TitanOne (talk) 20:58, 3 March 2010 (UTC)[reply]

  • Delete this article (meaning Law of Averages), with redirect to LLN. The cited source uses the term “law of averages” as a synonym for LLN, and does not provide the interpretation given in this article. The examples section looks like WP:OR. The first one describes the gambler's fallacy, for which we already have a fairly developed article; the second example should be dubbed “idiot’s fallacy” or something like that — really, is there a person who would think that out of 99 coin tosses, exactly 49.5 of them should be heads?; the third example is just a corollary from the strong law of large numbers, or from the second Borel-Cantelli lemma; the last example is not even funny — people don't think that in the longrun a good team and a bad team would perform equally, that would contradict the mere notion of “skill”. // stpasha » 22:18, 1 June 2010 (UTC)[reply]

When the LLN does not hold?

[edit]

I'm looking for a quick answer, trying to resolve a certain issue. Does the LLN hold even when we're collecting samples from and for a model/function that has infinite VC dimension?

I was reading some papers on statistical learning (http://dl.acm.org/citation.cfm?id=76371). They mention that "C is uniformly learnable if and only if the VC dimension of C is finite," where "a learning function for C is a function that, given a large enough randomly drawn sample of any target concept in C, returns a region in E (a hypothesis) that is with high probability a good approximation to the target concept." My understanding of "concept" here is function. Perhaps my understanding of "concept" is wrong or the LLN has limitations. — Preceding unsigned comment added by 150.135.222.152 (talk) 04:02, 18 October 2011 (UTC)[reply]

  • Yes; if the VC dimension is infinite the learning function (with high probability) still converges pointwise to the correct characteristic function. But the convergence won't be uniform. Unfortunately, this is hardly a "quick" answer.... Ben Standeven (talk) 17:48, 29 August 2014 (UTC)[reply]

Finite variance

[edit]

The article says that finite variance is not required, without citation or justification. Every single other source I saw said that finite variance is in fact needed. This writing titled Law of Large Numbers even specifically says that finite variance is needed, and uses the Cauchy distribution as an example where the variance is not finite, and the Law of Large Numbers does not hold (in the section 'Cauchy case'). — Preceding unsigned comment added by 62.49.144.162 (talk) 10:23, 29 May 2012 (UTC)[reply]

There are citations separately (slightly later) for the weak and strong forms of the law and when they hold. The article is quite specific about what these laws mean, but it may be that your source says the "law" means something else, such as the variance of the mean descreasing to zero (for which the variance would need to exist): in fact your source seems to be using this in its proof. In this case your source is stating a sufficient condition for the law to hold ... it can and does hold under weaker conditions. The "law" is the description of the behaviour of the mean, not really any one statement of conditions under which it can be said/shown to hold. However, the article could do with better citations. Melcombe (talk) 12:44, 29 May 2012 (UTC)[reply]
The Cauchy distribution is a bad example, it does not have a mean, and hence no finite variance or higher moments. And the proof using characteristic functions does not seem to use the assumption of finite variance. I'll add a citetation. — Preceding unsigned comment added by 83.89.65.201 (talk) 08:25, 30 June 2012 (UTC)[reply]

Wiki allows advertising now?

[edit]

Why on earth does an article on the law of large numbers lead to Nasim Taleb's vanity page? I have also deleted the rest of the sentence, which was unencyclopedic, and unnecessary. If you disagree, could you please show a reference from the serious lln literature that mentions lightning or references the black swan?

Otherwise it's not appropriate. — Preceding unsigned comment added by 82.132.235.94 (talk) 19:29, 31 August 2012 (UTC)[reply]

First of all, you removed information without explaining in an edit summary -- twice. That makes the edits subject to revert. Secondly, it might help the rest of us who can't read your mind to explain what you are referring to with your comment "lead to Nasim Taleb's vanity page". And finally, give a detailed explanation as to why you think the sentence "This assumes that all possible die roll outcomes are known and that Black Swan events such as a die landing on edge or being struck by lightning mid-roll are not possible or ignored if they do occur" is "unencyclopedic and unnecessary"; it is linked to a page with well sourced explanations as to why it is enyclopedic. Additionally, if you think Black swan theory is unencyclopedic you need to make your case at Talk:Black swan theory. Something very important you need to learn about Wikipedia: It is a collaborative project; it is not your personal website or plaything. Cresix (talk) 19:42, 31 August 2012 (UTC)[reply]
I agree with deleting the sentence. It makes a simple thing sound complicated.
There is a universal common-sense intuitive understanding of what it means to "roll a die". According to that understanding, black swan events are irrelevant and the simple sentence is completely correct.
Go find a random person on the street and ask him to roll five dice and calculate the average. Suppose that one of the five dice lands on a corner, or is eaten by a squirrel. The person will naturally and immediately pick up a die and re-roll it to get the fifth number to average. In effect, they will be ignoring the "bad roll". What else would you expect them to do? If the squirrel eats the die, then maybe they would count it as "rolling a 10 trillion"?? No! That's silly, no one would ever think to do that. The only sensible thing to do is to re-roll. If they did not have a spare die, they would say "I was not able to successfully roll the die, go ask someone else." People understand that "rolling a die" is not complete until you have an answer which is either 1,2,3,4,5,6.
There are two requirements for the term "black swan events" to be technically applicable: The events are (1) rare, and (2) sufficiently consequential to affect long-term average behavior. For example, the performance of a stockmarket investor, even averaged over 15 years, may be significantly altered by the amount he lost in a single hour during a market crash. So that's a black swan event. When you are rolling dice, a black swan event is impossible because the distribution of possible numerical results is so restricted: 1,2,3,4,5,6. It is never 10 billion!
So again, black swan events should certainly not be mentioned in the context of rolling dice. It is an irrelevant tangent. --Steve (talk) 01:13, 1 September 2012 (UTC)[reply]
Agree with Steve. McKay (talk) 03:30, 1 September 2012 (UTC)[reply]


A few technical remarks

[edit]

"with the accuracy increasing as more dice are rolled." This is not correct, and in the figure the accuracy for n=100 is greater than for n=200 or even 300.

"Convergence in probability is also called weak convergence of random variables". I don't think this is standard or fortunate. Convergence in distribution is already called weak convergence. The MSC (Mathematics Subject Classification) category 60F05 is "Central limit and other weak theorems", meaning theorems with convergence in distribution, not convergence in probability (as far as I know).

"Differences between the weak law and the strong law". It may be interesting to add here that the Weak Law may hold even if the expected value does not exist (see e.g. Feller's book). This underlines that, in their full generality, none of the laws follows directly from the other.

"Uniform law of large numbers". The uniform LLN holds under quite weaker hypotheses. This is definitely uninteresting to the average reader, but a reference to the Blum-DeHardt LLN or the Glivenko-Cantelli problem might be very valuable to a small fraction of readers.

"Borel's law of large numbers, named after Émile Borel, states that if an experiment is repeated a large number of times, independently under identical conditions, then the proportion of times that any specified event occurs approximately equals the probability of the event's occurrence on any particular trial;" The LLN as stated might as well be Bernoulli's original LLN from 1713. There seems to be no reason to attribute *that* statement to Borel. Compare e.g. http://www.encyclopediaofmath.org/index.php/Borel_strong_law_of_large_numbers93.156.35.219 (talk) 02:30, 2 January 2013 (UTC)[reply]

Why?

[edit]

OK, I'll be up front and admit that the math on this page is beyond me. I looked up the Law of Large Numbers to try and find out why it happens. (I mean why it happens, not how it happens.) So can someone explain in plain (or even complicated) English why something that is random each time you do it (eg tossing a coin or betting on roulette) tends to give a pattern over a large number of incidences? Why is it that we can anticipate (roughly) what the average will be, rather than its being completely random and not able to be anticipated? Surely there's a place for that issue in the article, if there is some literature on it. Thanks.89.100.155.6 (talk) 20:36, 25 January 2013 (UTC)[reply]


Difference between the Strong and the Weak Law - mistake

[edit]

"In particular, it implies that with probability 1, we have that for any ε > 0 the inequality holds for all large enough n.[1]". I do not believe this sentence (if I am wrong, please ignore me and delete this post). If you fix ε > 0 then for every n there is some small probability that . Indeed, with non-zero probability all the first n tosses are say > \mu + ε.

References

  1. ^ Ross (2009)
I agree, that the statement is wrong. However your explanation makes no sense to me. The strong law uses almost sure pointwise convergence. The wrong statement corresponds to uniform convergence.

--93.219.149.62 (talk) 19:54, 6 March 2014 (UTC)[reply]

These two comments seem correct to me : the mistake in the article stems from the fact that, given , the n for which depends on the point in the set of convergence (the non-uniformity alluded to in the second comment).
For example, for the flip of a fair coin, for any n there is a probability that the empirical mean deviates by 1/2 from the theoretical expectation ; the strong LLN only states that for these bad initial n tosses the error will a.s. be corrected later.
This seems like a fairly serious mistake to me so I'll immediately remove the wrong statement. jraimbau (talk) 09:07, 25 April 2022 (UTC)[reply]

condition E(|X|)<inf is same as that the random variables x has Lebesgue integrateable expectation

[edit]

What if we would use different legitimate integration methods for expectation definition as:

  1. REDIRECT [[2]]
  2. REDIRECT [[3]]

which is much more general than Lebesgue one?

Then we will shurely have random variables with finite expectation where L.L.N do not hold.http://www.math.vanderbilt.edu/~schectex/ccc/gauge/venn.gif — Preceding unsigned comment added by Itaijj (talkcontribs) 20:23, 2 February 2014 (UTC)[reply]

This whole section about "Lebesgue integrable" random variables makes *no mathematical sense whatsoever*. The person who wrote this clearly does not know the slightest thing about math. You cannot just take any random variable and start "integrating" it with respect to the Lebesgue measure. First study math (and measure theory) before you come to Wikipedia to "educate" people with your wisdom that is nothing more than pure ignorance and stupidity. 2A02:A466:58DC:1:D9:BECA:6E31:A8D7 (talk) 13:41, 8 May 2022 (UTC)[reply]

Methodological mistakes

[edit]

In my opinion, many statements expressed on this page are not correct, such as:

"It follows from the law of large numbers that the empirical probability of success in a series of Bernoulli trials will converge to the theoretical probability. For a Bernoulli random variable, the expected value is the theoretical probability of success, and the average of n such variables (assuming they are independent and identically distributed (i.i.d.)) is precisely the relative frequency."

"The LLN is important because it "guarantees" stable long-term results for the averages of random events."

"According to the law of large numbers, if a large number of six-sided die are rolled, the average of their values (sometimes called the sample mean) is likely to be close to 3.5, with the precision increasing as more dice are rolled."

This confuses conclusions from the mathematical theorem proven from Kolmogorov's axioms (of which there is very little for the axioms are very weak and do not provide a definition or constraints strong enough for a meaningful interpretation of probability), from its intuitive interpretation that requires additional assumptions, equivalent to assuming the law itself true a priori. See a more elaborate explanation here:

http://math.stackexchange.com/questions/777493/do-the-kolmogorovs-axioms-permit-speaking-of-frequencies-of-occurence-in-any-me

Stable relative frequencies in the real world are discovered empirically and are not conclusions from any mathematical theorem. Ascribing "P()'s" to events with a frequency interpretation in mind is the same as already assuming the relative frequencies of those events converge in the limit of an infinite number of trails to a definite number, this "P()". The only thing the theorem allows to conclude, is that if all the relative frequencies involved in the given reasoning are stable in the first place, the difference from a finite number of trails between the measured and "ideal" mean is likely to be less than so and so.

Jarosław Rzeszótko (talk) 06:56, 2 May 2014 (UTC)[reply]

The first example is awkward

[edit]

The six numbers on a die are interchangeable with any other set of symbols - is an integer mean relevant? My first guess is that the result would be 3, if I'm looking at random integers [0-6], rather than 7/2 which seems like part of a different concept, or an artifact of the way dice are labeled Cegandodge (talk) 03:34, 19 March 2016 (UTC)[reply]

Possible issue with statement of uniform LLN

[edit]

Looking through the references currently given for the uniform law of large numbers, I notice a technical issue in the current statement. One of the references (Newey & McFadden 1994) gives a formulation of the uniform LLN which allows for the function f to be continuous almost everywhere, but provides only for uniform convergence in probability. The other (Jennrich 1969) gives a formulation which allows only for the function f to be continuous everywhere (not allowing a set of measure 0 on which discontinuities may occur), but gives the stronger mode of a.s. convergence. Is there an obvious synthesis of these two statements which yields the hybrid given in the article (a.e. continuous function f as well as a.s. convergence) or is there a reference out there which gives the stronger statement? If not, it may be worth revising the statement to more accurately reflect the references. Gillespie09 22:17, 21 March 2021 (UTC) — Preceding unsigned comment added by Gillespie09 (talkcontribs)

Assessment comment

[edit]

The comment(s) below were originally left at Talk:Law of large numbers/Comments, and are posted here for posterity. Following several discussions in past years, these subpages are now deprecated. The comments may be irrelevant or outdated; if so, please feel free to remove this section.

I'd love a proof of the strong law. Aastrup 11:28, 29 July 2007 (UTC)[reply]

Last edited at 11:28, 29 July 2007 (UTC). Substituted at 20:03, 1 May 2016 (UTC)

add a category to recall the fact that despite the deviation to the mean decreases with increasing numbers, the standard deviation (so the raw deviation between theoretical output and the actual one) increases when the number of trial increases

[edit]

I don't know if this page is active, but it's a classic mistake to think that since by increasing the number of trials, the empirical average gets closer to its theoretical value, it's the same for the sum of the outcome, that would get closer to the sum of the average outcome, while in fact, it's not the case (and on the contrary, the standard deviation increases), and this value converges only if we divide it by the number of trials.

and i think it would be good, to underline the fact that only the average converges and not the sum of the outcome minus the theoretical outcome, to add a paragraph about this, and also a diagram showing a dice throwing experiment (with excel, with the number of throws on the abscissa, and the sum of the results on the ordinate, so that we can see that the curve of the results doesn't converge towards the theoretical curve), and next to it the curve of the empirical average (of the same experiment) which we would see converging towards the theoretical line

I don't do the modification myself, because I'm not too used to the wikipedia codes (and I already got a slap on the wrist for doing that, but, as I have the impression that this page doesn't seem to be very active, if nobody reacts after a month or so, I'll do the modification myself. — Preceding unsigned comment added by 2A01:CB11:88F:A800:6CDA:5A2C:D4F2:CDC (talk) 11:21, 30 October 2021 (UTC)[reply]

Bad introduction

[edit]

The entire introductory section is currently as follows:

"In probability theory, the law of large numbers (LLN) is a theorem that describes the result of performing the same experiment a large number of times. According to the law, the average of the results obtained from a large number of trials should be close to the expected value and tends to become closer to the expected value as more trials are performed.

"The LLN is important because it guarantees stable long-term results for the averages of some random events.[1][2] For example, while a casino may lose money in a single spin of the roulette wheel, its earnings will tend towards a predictable percentage over a large number of spins. Any winning streak by a player will eventually be overcome by the parameters of the game. Importantly, the law applies (as the name indicates) only when a large number of observations are considered. There is no principle that a small number of observations will coincide with the expected value or that a streak of one value will immediately be "balanced" by the others (see the gambler's fallacy).

"It is also important to note that the LLN only applies to the average. Therefore, while

other formulas that look similar are not verified, such as the raw deviation from "theoretical results":

not only does it not converge toward zero as n increases, but it tends to increase in absolute value as n increases."


It is an astonishingly terrible idea to use a wholly unexplained symbol in the introductory paragraph ... or anywhere.

The introduction uses infinitely many unexplained symbols.

I hope that someone knolwedgeable about this topic can rewrite the introduction so that it is comprehensible to most readers.

Preferably by someone who understands what writing an encyclopedia article entails.

BUT ALSO: The introduction states the law of large numbers as an equality. It is not an equality; it is an equality with probability one. 2601:200:C000:1A0:808C:2579:CA92:A870 (talk) 15:48, 15 July 2022 (UTC)[reply]

References

  1. ^ Cite error: The named reference :0 was invoked but never defined (see the help page).
  2. ^ Yao, Kai; Gao, Jinwu (2016). "Law of Large Numbers for Uncertain Random Variables". IEEE Transactions on Fuzzy Systems. 24 (3): 615–621. doi:10.1109/TFUZZ.2015.2466080. ISSN 1063-6706. S2CID 2238905.

Bad writing

[edit]

The introductory section contains this passage:

"It is also important to note that the LLN only applies to the average. Therefore, while

other formulas that look similar are not verified, such as the raw deviation from "theoretical results":

not only does it not converge toward zero as n increases, but it tends to increase in absolute value as n increases."

But: The meaning of the term "theoretical results" is not necessarily clear to many readers.

Unfortunately, the meaning of the term " "theoretical results" " (the previous term, but ths time inside quootation marks) is even less clear. 2601:200:C000:1A0:3938:3645:9394:290D (talk) 01:52, 24 August 2022 (UTC)[reply]

Incorrect statement

[edit]

One of the introductory sentences:

not only does it not converge toward zero as n increases, but it tends to increase in absolute value as n increases."

Is false, the difference in absolute value will be unbounded, but it will also be 0 an infinite amount of times. The lim inf will be zero, and the lim sup will be infinity. 2A01:11:8A10:8690:9A7:D52C:C665:FDF (talk) 23:31, 14 February 2023 (UTC)[reply]

BirthdaBirthday date problem issue sir Birthday date problem issue sir 2409:40C4:2011:3634:D491:55EC:936D:EF6B (talk) 13:54, 29 July 2024 (UTC)[reply]

Huh? Are you referring to the birthday problem? –Novem Linguae (talk) 21:02, 29 July 2024 (UTC)[reply]

Incorrect Example for "Application" section

[edit]

The section on application that uses Monte Carlo simulation and the Law of Large Numbers to approximate an integral may be erroneous. I wrote a program in SAS to carry out this approximation and was getting strange results. I changed the function to x^2 and used my program to approximate this integral over [0,3] and came out with an answer that was very close to 9. When I switched back to the presented function I did not get answers consistent with the article. Concerned that I was doing something wrong in SAS, I also carried out the same process in R and got the same answers I got in SAS.

SAS Program:

%macro mcintegral (a,b,n);

data mc1;

  do i = 1 to &n;
     xi = &a+%sysevalf(&b-&a)*ranuni(0);  * Generate U[a,b] random values            *;

* Set up function for integration manually *; /* fi = xi**2; Simple Example for process checking */ fi = cos(xi)*cos(xi)*sqrt((xi*xi*xi)+1); /* Wikipedia Example 1 */

output;

  end;
  drop i;

run;

data mc2;

  set mc1;
  sum + fi;
  n = _n_;
  mean = %sysevalf(&b - &a)*sum/n;

run;

proc print data=mc2;

  where n gt %eval(&n-10);

run;

%mend;

%mcintegral(-1,2,1000); *** Should be about 1 when using f(x)=cos^2(x)*sqrt(x^3 + 1) if Wikipedia page is correct ***;

Observed answer using 1000 random values: 1.5905

R Program:

a <- -1 b <- 2 n <- 10000

f_x <- function(s){cos(s)*cos(s)*sqrt((s*s*s) + 1)}

means <- rep(0,n) ## Initialize vector of means

x <- a + (b-a)*runif(n) ## iid Uniform Xs on [a,b] f <- f_x(x) ## Apply the function

for (i in 1:n) {

  means[i] = (b-a)*sum(f[1:i])/i

}

means[n] ### Should return the AUC for f(x) from a to b ###

Returns a value of 1.611217

I believe my programs are producing the correct answers, which is why I am concerned that the example on the LLN page may be erroneous. Can someone please verify my calculations or tell me where the error is in my code? 2600:381:D080:1A8D:B10A:CE9B:93A:5DAB (talk) 16:38, 30 July 2024 (UTC)[reply]