Llei dels grans nombres

De Viquipèdia
Salta a la navegació Salta a la cerca
Una il·lustració de la llei dels grans nombres, amb una sèrie concreta de llançaments d'un dau. Conforme augmenta el nombre de llançaments, la mitjana dels valors de tots el resultats s'aproxima a 3,5. Mentre que sèries diferents de llançaments poden mostrar un esquema diferent quan ecara s'han fet pocs llançaments (a l'esquerra), quan augmenta el nombre de llançaments (a la dreta) les sèries es comporten de manera similar.

En teoria de la probabilitat, la llei dels grans nombres és un teorema segons el qual quan el nombre d'observacions d'un fenomen aleatori és molt gran, la freqüència d'un esdeveniment associat amb aquest s'aproxima progressivament a un valor determinat. Aquest valor s'anomena probabilitat de l'esdeveniment.

Gràcies a aquesta llei podem, experimentalment:

  • Comprovar si són vàlides o no les probabilitats assignades a priori als esdeveniments dels instruments aleatoris suposadament regulars.
  • Obtenir de manera aproximada les probabilitats d'esdeveniments d'experiències aleatòries irregulars.

Aquesta llei és important perquè garanteix relacions estables entre les mitjanes de diversos esdeveniments aleatoris. Per exemple, mentre que un casino pot perdre diners en una simple tirada de la ruleta, els seus guanys tendiran a un percentatge predictible amb un nombre gran de tirades. Qualsevol tongada sort del jugador serà, eventualment, superada pels paràmetres del joc. Cal recordar que la llei, però, tan sols s'aplica quan es considera un nombre elevat d'observacions, tal com el nom indica. El principi no es pot aplicar per un nombre petit d'observacions ni es pot esperar que una tongada d'un valor concret sigui immediatament "equilibrada" amb l'obtenció d'altres valors (consulta la fal·làcia del jugador).


Exemples[modifica]

Per exemple, una única tirada d'un dau equilibrat de sis cares té sis possibles resultats (1, 2, 3, 4, 5 o 6), tots amb la mateixa probabilitat. Per tant, el valor esperat de la mitjana de tirades és de:

Segons la llei dels grans nombres, si es tiren un nombre elevat de daus de 6 cares, la mitjana dels seus valors serà pròxima a 3.5 i la seva precisió augmentarà amb la tirada de més daus.

D'aquesta llei, se'n pot deduir que la probabilitat empírica d'un succés o esdeveniment en una sèrie d'assajos de Bernoulli convergiran a la probabilitat teòrica. Per una variable aleatòria de Bernoulli, el valor esperat després d'un nombre d'assajos prou elevat coincideix amb la probabilitat teòrica de l'esdeveniment i la mitjana de les n variables (assumint que són aleatòries, independents i idènticament distribuïdes (i.i.d.)) çes precisament la freqüència relativa.

Per exemple, la tirada d'una moneda equilibrada (on la probabilitat d'obtenir cada cara és igual), és un assaig de Bernoulli. Quan es tira per primer cop, la probabilitat de cara és 1/2. Per tant, segons la llei dels grans nombres, la proporció de cares en un nombre "gran" de tirades "hauria de ser" aproximadament 1/2. En concret, la proporció de cares després de n tirades convergirà de forma quasisegura cap a 1/2 a mesura que n s'apropa a infinit.

Malgrat que la proporció de cara (i creu) s'apropa a 1/2, a mesura que creix el nombre de tirades, pràcticament segur que la diferència absoluta entre el nombre de cares i creus també creixerà. D'altra banda, també pràcticament segur que el ràtio de la diferència absoluta respecte el nombre de tirades s'aproximarà a zero. De forma inuïtiva, la diferència absoluta esperada creix, però a un ritme menor que el nombre de tirades.

History[modifica]

Diffusion is an example of the law of large numbers. Initially, there are solute molecules on the left side of a barrier (magenta line) and none on the right. The barrier is removed, and the solute diffuses to fill the whole container.
Top: With a single molecule, the motion appears to be quite random.
Middle: With more molecules, there is clearly a trend where the solute fills the container more and more uniformly, but there are also random fluctuations.
Bottom: With an enormous number of solute molecules (too many to see), the randomness is essentially gone: The solute appears to move smoothly and systematically from high-concentration areas to low-concentration areas. In realistic situations, chemists can describe diffusion as a deterministic macroscopic phenomenon (see Fick's laws), despite its underlying random nature.

El matemàtic italià Gerolamo Cardano (1501–1576) va constatar, sense demostrar, que la precisió de les mesures estadístiques empíriques tendien a millorar amb el nombre d'assajos[1] i es va formalitzar com a llei dels grans nombres. Una forma especial d'aquesta llei, per les variables aleatòries binàries) va ser demostrar primerament per Jacob Bernoulli.[2] Li va costar més de 20 anys desenvolupar una prova matemàtica suficientment rigorosa, que va ser publicada en la seva obra Ars Conjectandi (L'art de la conjentura) el 1713. El va anomenar el seu "Teorema daurat", però va ser conegut generalment amb el nom del "Teorema de Bernoulli", que no s'ha de confondre amb el Principi de Bernoulli, referit al seu cosí Daniel Bernoulli. El 1837, S.D. Poisson el va desenvolupar més sota el nom "la loi des grands nombres" ("La llei dels grans nombres").[3][4] D'aleshores encà, es coneix pels dos noms, tot i que la "Llei dels grans nombres" és més freqüent.

Després que Benroulli i Poisson publiquessin els seus esforços, altres matemàtics van contribuir a refinar la llei, com Chebyshev,[5] Markov, Borel, Cantelli and Kolmogorov i Khinchin. Markov va demostrar que la llei es podia aplicar a variables aleatòries que no tinguessin una variància finita sota alguna altra hipòtesi més feble, i Khinchin va provar, el 1929, que si la sèrie consistia en variables aleatòries independents i idènticament distribuïdes, era suficient que el valor esperat existis per tal que la llei feble dels grans nombres fos veritat.[6] Com a conseqüència d'aquests nous estudis, van sorgir dos formes prominents de la Llei dels grans nombres. Una anomenada la llei "feble" i l'altra la llei "forta", en referència a dos formes diferents de la convergència de la mitjana cumulativa de mostres cap al valor infinit. Tal com s'explica més endavant, la forma forta implica la feble.[7]

Formes[modifica]

Existeixen dues versions diferents de la llei dels grans nombres: la llei forta dels grans nombres i la llei feble dels grans nombres. Per una seqüència infinita de variables aleatòries Lebesgue integrables X1, X2, ... amb valor esperat E(X1) = E(X2) = ...= µ, ambdues versions de la llei afirmen que, amb certesa virtual, la mitjana mostral, definida com a

convergeix al valor esperat

 

 

 

 

(llei 1)

La integrabilitat de Lebesgue per Xj significa que el valor esperat E(Xj) existeix seguint la Integral de Lebesgue i és finit. No implica que la mesura de probabilitat associada sigui continua absolutament respecte la mesura de Lebesgue.

La hipòtesi de variància finita Var(X1) = Var(X2) = ... = σ2 < ∞ no és necessària. Una variància gran o infinita farà que la convergència sigui més lenta, però la llei dels grans nombres es manté de tota manera. Aquesta hipòtesi, però, sovint s'usa per tal de fer la demostració més fàcil i més curta.

La independència mútua de les variables aleatòries pot ser substituïda per la independència parell a en ambdues versoins de la llei.[8]

La diferència entre la versió de la llei feble i la forta rau en la manera en què la convergència és definida.

Llei feble[modifica]

Simulation illustrating the law of large numbers. Each frame, a coin that is red on one side and blue on the other is flipped, and a dot is added in the corresponding column. A pie chart shows the proportion of red and blue so far. Notice that while the proportion varies significantly at first, it approaches 50% as the number of trials increases.

The weak law of large numbers (also called Khinchin's law) states that the sample average converges in probability towards the expected value[9]

 

 

 

 

(law. 2)

That is, for any positive number ε,

Interpreting this result, the weak law 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.

As mentioned earlier, the weak law applies in the case of i.i.d. random variables, but it also applies in some other cases. For example, the variance may be different for each random variable in the series, keeping the expected value constant. If the variances are bounded, then the law applies, as shown by Chebyshev as early as 1867. (If the expected values change during the series, then we can simply apply the law to the average deviation from the respective expected values. The law then states that this converges in probability to zero.) In fact, Chebyshev's proof works so long as the variance of the average of the first n values goes to zero as n goes to infinity.[6] As an example, assume that each random variable in the series follows a Gaussian distribution with mean zero, but with variance equal to , which is not bounded. At each stage, the average will be normally distributed (as the average of a set of normally distributed variables). The variance of the sum is equal to the sum of the variances, which is asymptotic to . The variance of the average is therefore asymptotic to and goes to zero.

An example where the law of large numbers does not apply is the Cauchy distribution. Another example is where the random numbers equal the tangent of an angle uniformly distributed between −90° and +90°. The median is zero, but the expected value does not exist, and indeed the average of n such variables has the same distribution as one such variable. It does not converge in probability towards zero (or any other value) as n goes to infinity.

There are also examples of the weak law applying even though the expected value does not exist. See #Differences between the weak law and the strong law.

Strong law[modifica]

The strong law of large numbers states that the sample average converges almost surely to the expected value[10]

 

 

 

 

(law. 3)

That is,

What this means is that the probability that, as the number of trials n goes to infinity, the average of the observations converges to the expected value, is equal to one.

The proof is more complex than that of the weak law.[11] This law justifies the intuitive interpretation of the expected value (for Lebesgue integration only) of a random variable when sampled repeatedly as the "long-term average".

Almost sure convergence is also called strong convergence of random variables. This version is called the strong law because random variables which converge strongly (almost surely) are guaranteed to converge weakly (in probability). 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 is known to hold in certain conditions where the strong law does not hold and then the convergence is only weak (in probability).[Cal aclariment]


The strong law of large numbers can itself be seen as a special case of the pointwise ergodic theorem.

The strong law applies to independent identically distributed random variables having an expected value (like the weak law). This was proved by Kolmogorov in 1930. It can also apply in other cases. Kolmogorov also showed, in 1933, that if the variables are independent and identically distributed, then for the average to converge almost surely on something (this can be considered another statement of the strong law), it is necessary that they have an expected value (and then of course the average will converge almost surely on that).[12]

If the summands are independent but not identically distributed, then

provided that each Xk has a finite second moment and

This statement is known as Kolmogorov's strong law, see e.g. Sen & Singer (1993, Theorem 2.3.10).

An example of a series where the weak law applies but not the strong law is when Xk is plus or minus (starting at sufficiently large k so that the denominator is positive) with probability 1/2 for each.[12] The variance of Xk is then Kolmogorov's strong law does not apply because the partial sum in his criterion up to k=n is asymptotic to and this is unbounded.

If we replace the random variables with Gaussian variables having the same variances, namely then the average at any point will also be normally distributed. The width of the distribution of the average will tend toward zero (standard deviation asymptotic to ), but for a given ε, there is probability which does not go to zero with n that the average sometime after the nth trial will come back up to ε. Since this probability does not go to zero [Cal aclariment], it must have a positive lower bound p(ε), which means there is a probability of at least p(ε) that the average will attain ε after n trials. It will happen with probability p(ε)/2 before some m which depends on n. But even after m, there is still a probability of at least p(ε) that it will happen. (This seems to indicate that p(ε)=1 and the average will attain ε an infinite number of times.)

Differences between the weak law and the strong law[modifica]

The weak law states that for a specified large n, the average is likely to be near μ. Thus, it leaves open the possibility that happens an infinite number of times, although at infrequent intervals. (Not necessarily for all n).

The strong law shows that this almost surely will not occur. In particular, it implies that with probability 1, we have that for any ε > 0 the inequality holds for all large enough n.[13]

The strong law does not hold in the following cases, but the weak law does.[14][15][16]

1. Let X be an exponentially distributed random variable with parameter 1. The random variable has no expected value according to Lebesgue integration, but using conditional convergence and interpreting the integral as a Dirichlet integral, which is an improper Riemann integral, we can say:

2. Let x be geometric distribution with probability 0.5. The random variable does not have an expected value in the conventional sense because the infinite series is not absolutely convergent, but using conditional convergence, we can say:

3. If the cumulative distribution function of a random variable is

then it has no expected value, but the weak law is true.[17][18]

Uniform law of large numbers[modifica]

Suppose f(x,θ) is some function defined for θ ∈ Θ, and continuous in θ. Then for any fixed θ, the sequence {f(X1,θ), f(X2,θ), ...} will be a sequence of independent and identically distributed random variables, such that the sample mean of this sequence converges in probability to E[f(X,θ)]. This is the pointwise (in θ) convergence.

The uniform law of large numbers states the conditions under which the convergence happens uniformly in θ. If[19][20]

  1. Θ is compact,
  2. f(x,θ) is continuous at each θ ∈ Θ for almost all xs, and measurable function of x at each θ.
  3. there exists a dominating function d(x) such that E[d(X)] < ∞, and

Then E[f(X,θ)] is continuous in θ, and

This result is useful to derive consistency of a large class of estimators (see Extremum estimator).

Borel's law of large numbers[modifica]

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 larger the number of repetitions, the better the approximation tends to be. More precisely, if E denotes the event in question, p its probability of occurrence, and Nn(E) the number of times E occurs in the first n trials, then with probability one,[21]

This theorem makes rigorous the intuitive notion of probability as the long-run relative frequency of an event's occurrence. It is a special case of any of several more general laws of large numbers in probability theory.

Chebyshev's inequality. Let X be a random variable with finite expected value μ and finite non-zero variance σ2. Then for any real number k > 0,

Proof of the weak law[modifica]

Given X1, X2, ... an infinite sequence of i.i.d. random variables with finite expected value E(X1) = E(X2) = ... = µ < ∞, we are interested in the convergence of the sample average

The weak law of large numbers states:

Theorem:

 

 

 

 

(law. 2)

Proof using Chebyshev's inequality assuming finite variance[modifica]

This proof uses the assumption of finite variance (for all ). The independence of the random variables implies no correlation between them, and we have that

The common mean μ of the sequence is the mean of the sample average:

Using Chebyshev's inequality on results in

This may be used to obtain the following:

As n approaches infinity, the expression approaches 1. And by definition of convergence in probability, we have obtained

 

 

 

 

(law. 2)

Proof using convergence of characteristic functions[modifica]

By Taylor's theorem for complex functions, the characteristic function of any random variable, X, with finite mean μ, can be written as

All X1, X2, ... have the same characteristic function, so we will simply denote this φX.

Among the basic properties of characteristic functions there are

if X and Y are independent.

These rules can be used to calculate the characteristic function of in terms of φX:

The limit  eitμ  is the characteristic function of the constant random variable μ, and hence by the Lévy continuity theorem, converges in distribution to μ:

μ is a constant, which implies that convergence in distribution to μ and convergence in probability to μ are equivalent (see Convergence of random variables.) Therefore,

 

 

 

 

(law. 2)

This shows that the sample mean converges in probability to the derivative of the characteristic function at the origin, as long as the latter exists.

Vegeu també[modifica]

Notes[modifica]

  1. Mlodinow, L. The Drunkard's Walk. New York: Random House, 2008. p. 50.
  2. Jakob Bernoulli, Ars Conjectandi: Usum & Applicationem Praecedentis Doctrinae in Civilibus, Moralibus & Oeconomicis, 1713, Chapter 4, (Translated into English by Oscar Sheynin)
  3. Poisson names the "law of large numbers" (la loi des grands nombres) in: S.D. Poisson, Probabilité des jugements en matière criminelle et en matière civile, précédées des règles générales du calcul des probabilitiés (Paris, France: Bachelier, 1837), p. 7. He attempts a two-part proof of the law on pp. 139–143 and pp. 277 ff.
  4. Hacking, Ian. (1983) "19th-century Cracks in the Concept of Determinism", Journal of the History of Ideas, 44 (3), 455-475 Plantilla:Jstor
  5. Tchebichef, P. «Démonstration élémentaire d'une proposition générale de la théorie des probabilités». Journal für die reine und angewandte Mathematik, 1846, 33, 1846, pàg. 259–267. DOI: 10.1515/crll.1846.33.259.
  6. 6,0 6,1 «Law of large numbers».
  7. Seneta, 2013.
  8. Etemadi, N.Z. «An elementary proof of the strong law of large numbers». Wahrscheinlichkeitstheorie Verw Gebiete, 55, 1, 1981, pàg. 119–122. DOI: 10.1007/BF01013465.
  9. Loève 1977, Chapter 1.4, p. 14
  10. Loève 1977, Chapter 17.3, p. 251
  11. «The strong law of large numbers – What's new». Terrytao.wordpress.com. [Consulta: 9 juny 2012].
  12. 12,0 12,1 «Strong law of large numbers».
  13. Ross (2009)
  14. Lehmann, Erich L; Romano, Joseph P. Weak law converges to constant, 2006-03-30. ISBN 9780387276052. 
  15. «A NOTE ON THE WEAK LAW OF LARGE NUMBERS FOR EXCHANGEABLE RANDOM VARIABLES». Dguvl Hun Hong and Sung Ho Lee.
  16. «weak law of large numbers: proof using characteristic functions vs proof using truncation VARIABLES».
  17. «Law of large numbers».
  18. «Law of large numbers».
  19. Newey & McFadden 1994, Lemma 2.4
  20. Jennrich, Robert I. «Asymptotic Properties of Non-Linear Least Squares Estimators». The Annals of Mathematical Statistics, 40, 2, 1969, pàg. 633–643. DOI: 10.1214/aoms/1177697731.
  21. An Analytic Technique to Prove Borel's Strong Law of Large Numbers Wen, L. Am Math Month 1991

Referències[modifica]

  • Grimmett, G. R.; Stirzaker, D. R. Probability and Random Processes, 2nd Edition. Clarendon Press, Oxford, 1992. ISBN 0-19-853665-8. 
  • Richard Durrett. Probability: Theory and Examples, 2nd Edition. Duxbury Press, 1995. 
  • Martin Jacobsen. Videregående Sandsynlighedsregning (Advanced Probability Theory) 3rd Edition. HCØ-tryk, Copenhagen, 1992. ISBN 87-91180-71-6. 
  • Loève, Michel. Probability theory 1. 4th. Springer Verlag, 1977. 
  • Newey, Whitney K.; McFadden, Daniel. Large sample estimation and hypothesis testing. Elsevier Science, 1994, p. 2111–2245. 
  • Ross, Sheldon. A first course in probability. 8th. Prentice Hall press, 2009. ISBN 978-0-13-603313-4. 
  • Sen, P. K; Singer, J. M.. Large sample methods in statistics. Chapman & Hall, Inc, 1993. 
  • Seneta, Eugene «A Tricentenary history of the Law of Large Numbers». Bernoulli, 19, 4, 2013, p. 1088–1121. DOI: 10.3150/12-BEJSP12.

Enllaços externs[modifica]