Jump to content

File:Convergence in distribution (sum of uniform rvs).gif

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Convergence_in_distribution_(sum_of_uniform_rvs).gif (200 × 148 pixels, file size: 20 KB, MIME type: image/gif, looped, 9 frames, 12 s)

Summary

Description
English: Z_n is a normalized sum of iid uniform random variables: Z_n = 1/√n Sum{U(-1,1): i=1,...,n}. The animation shows how the pdfs of Z_n converge to a normal N(0,⅓) random variable.
Source Own work
Author Stpasha

Mathematica source

f[x_] := If[-1 <= x <= 1, 1/2, 0];
f2[x_] := Evaluate[\!\(\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \(\[Infinity]\)]f[t] f[x - t] \[DifferentialD]t\)];
f3[x_] := Evaluate[\!\(\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \(\[Infinity]\)]f[t] f2[x - t] \[DifferentialD]t\)];
f4[x_] := Evaluate[\!\(\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \(\[Infinity]\)]f[t] f3[x - t] \[DifferentialD]t\)];
f5[x_] := Evaluate[\!\(\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \(\[Infinity]\)]f[t] f4[x - t] \[DifferentialD]t\)];
f6[x_] := Evaluate[\!\(\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \(\[Infinity]\)]f[t] f5[x - t] \[DifferentialD]t\)];
f7[x_] := Evaluate[\!\(\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \(\[Infinity]\)]f[t] f6[x - t] \[DifferentialD]t\)];
f8[x_] := Evaluate[\!\(\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \(\[Infinity]\)]f[t] f7[x - t] \[DifferentialD]t\)];
f9[x_] := Evaluate[\!\(\*SubsuperscriptBox[\(\[Integral]\), \(-\[Infinity]\), \(\[Infinity]\)]f[t] f8[x - t] \[DifferentialD]t\)];
fn[n_, x_] := \[Piecewise] {
  {Sqrt[1] f1[Sqrt[1] x], n == 1},
  {Sqrt[2] f2[Sqrt[2] x], n == 2},
  {Sqrt[3] f3[Sqrt[3] x], n == 3},
  {Sqrt[4] f4[Sqrt[4] x], n == 4},
  {Sqrt[5] f5[Sqrt[5] x], n == 5},
  {Sqrt[6] f6[Sqrt[6] x], n == 6},
  {Sqrt[7] f7[Sqrt[7] x], n == 7},
  {Sqrt[8] f8[Sqrt[8] x], n == 8},
  {Sqrt[9] f9[Sqrt[9] x], n == 9}
  }
Table[
  Plot[fn[n, x], {x, -2, 2}, 
    Exclusions -> None, 
    PlotRange -> {0, 0.8}, 
    ImageSize -> 200, 
    PlotStyle -> Thickness[Large], 
    LabelStyle -> Directive[Larger], 
    Epilog -> Inset[Style["\!\(\*StyleBox[\"n\",\nFontSlant->\"Italic\"]\) = " <> ToString[n],18], {1.2, 0.75}]
    ], 
  {n, 1, 9, 1}
  ]
Export["c:/anim.gif", %, 
  "DisplayDurations" -> {1, 1, 1, 1, 1, 1, 1, 1, .25}, 
  "TransparentColor" -> White
  ]

Licensing

Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

image/gif

e339929786640eeee64c3a39fc1c1e5030ec7e9f

20,318 byte

12 second

148 pixel

200 pixel

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current23:50, 13 September 2009Thumbnail for version as of 23:50, 13 September 2009200 × 148 (20 KB)Stpasha{{Information |Description={{en|1=Z_n is a normalized sum of iid uniform random variables: Z_n = 1/√n Sum[][-1,1], i=1,...,n]. The animation shows how the pdfs of Z_n converge to a normal N(0, ⅓) random variable.}} |Source=Own work by uploader |A

The following 2 pages use this file:

Global file usage

The following other wikis use this file: