Experiment FindingsPDF Available

Central Limit Theorem

Authors:
Central Limit Theorem
Ekin Bircan Bo¸sdurmaz 1, G¨orkem Bozkurt1,˙
Ilke Atasoy1
1Department of Physics, Bilkent University.
C¸ ankaya, 06800 Ankara, Turkey.
(Dated: February 9, 2020)
Probability is essential for both natural and social sciences. It is a tool for understanding, an-
alyzing, estimating random events. Even though the outcome of the events can not be predicted
certainly, the independent random outcomes has a certain distribution. In this experiment we
explored the Central Limit Theorem which is the result of the probability theory. [1]
I. INTRODUCTION
A. The Central Limit Theorem
The law of large numbers states that, the distribution
of the sample mean Mnis concentrated increasingly near
the true mean µ. It variance tends to zero while the
variance of the sum:
Sn=X1+... +Xn=nMn(1)
increases to infinity. And the distribution doesn’t con-
verge to something meaningful.[2] However an interme-
diate view can be obtained by the deviation Snof
Snfrom the mean , and scaling it to a factor propor-
tional to 1/n. The central limit theorem says that the
distribution of this variable approaches a normal distri-
bution.[2]
Let X1, X2, ... be a seq. which are independent and
distributed random variables with variance σ2and mean
µ. Thus Znis defined as:
Zn=Sn
σn=X1+... +Xn
σn(2)
This yields:
E[Zn] = E[X1+... +Xn]
σn= 0 (3)
then, the CDF converges to normal CDF,
Φ(z) = 1
2πZz
−∞
ex2/2dx (4)
where for every z:
lim
n→∞ P(Znz) = Φ(z),(5)
II. SETUP
Setup of this experiment is consist of;
-6 single ideal dices
-6 broken dices
-2 correlated dices
-Cups for rolling the dices
III. RESULTS AND DISCUSSION
The experiment consists of 5 tasks.
A. Task 1
For the first task, 1 single dice to 6 dices were rolled
for 200 times, and each time the results were collected,
mean values of the outcomes were plotted with MatLab.
We used to “subplot” command of MatLab to make the
comparison between different cases easier. As it can be
seen from the histograms, the distribution of the out-
comes is more spread with less dices but converging to
normal distribution as the number of the dices increase.
Figure 1. Mean Values of the outcomes with the Ideal Dices
B. Task 2
For the second task, same procedure in the first task
was repeated but with broken dices. Which were cut
from one of the corners but the numbers can be seen.
The plots that we obtained from MatLab can be seen in
the figure. The convergence to the normal distribution
as the number of dices increase can be observed in these
histograms too. But when it is compared to the ideal
dices, it can be seen that it is more spread and more
random.
Figure 2. Mean Values of the outcomes the Broken Dices
C. Task 3
The third case is done with correlated dices. Meaning,
two dices were tied with a string. As it can be seen from
the plot, we observed that in the correlated case, the
histogram is more spread, even when it is compared to
the previous two cases with the 2 dices, because of the
constraint. Although the reason for that is more or less
ambiguous, it is for sure that the way that the string was
tied, leads the mean values of the outcomes became more
spread.
Figure 3. Mean Values of the outcomes the Correlated Dices
D. Task 4
For this task, we wrote a MATLAB program (can be
found in appendix) to analyze the mean and the standard
deviation of our collected data. In the following figures
you can see the standard deviation and mean of data sets
with respect to number of dices. The calculated mean
values are in the expected limits that can be calculated
theoretically.
Figure 4. Standard Deviations of the Distributions as a Func-
tion of Dice
Figure 5. Means of the Distributions as a Function of Dice
E. Task 5
One of the important theorems of probability theory is
the Central Limit Theorem. As we discussed in the in-
troduction part, it basically says that distribution of ran-
dom variables approaches the normal distribution with
increasing number of events. In the following figure you
can see the sum of two dices for 100, 500, 1000 and
100.000 throws.
Figure 6. Sum of Dice for Different Number of Throws
As you can see from figure, 100.000 throws case looks
like a typical Gaussian distribution.
IV. CONCLUSION
In this experiment, Central Limit Theorem was ex-
plored with dices of different kinds. The distribution
of the mean values of the outcomes of different cases
were obtained. Since it is a result of the probability
theory, procedures with more dices gives more satisfy-
ing results and plots. Also the case with the correlated
dices and how binding two dices affects the outcomes
were observed. The concepts of the probability theory
were explored with the Central Limit Theorem.
REFERENCES
[1] David O. Siegmund. Probability theory. Online. En-
cyclopædia Britannica, inc. url:https : / / www .
britannica .com / science/ probability- theory / The-
central-limit-theorem.
[2] D. P. Bertsekas and J. N. Tsitsiklis. Introduction to Prob-
ability. Athena Scientific, 2008.
V. APPENDIX
A. MATLAB Code used for Dice Throws
f ir st = r an di ( [1 6 ] ,1 00 , 1) ’
+ r an di ( [1 6 ] ,1 00 , 1) ’ ;
s ec on d = r an d i ([ 1 6] , 50 0 ,1 ) ’
+ r an di ( [1 6 ] ,5 00 , 1) ’ ;
5t hi rd = ra n di ( [1 6] , 10 00 , 1) ’
+ r an di ( [1 6 ] ,1 00 0 ,1 ) ’;
f ou rt h = r an di ( [1 6] , 10 00 00 , 1) ’
+ r an di ( [1 6] , 10 00 00 , 1) ’ ;
pos s 2 = [2:1 2 ] ;
10
f ir s t = h is t ( f ir st , p os s 2 );
s ec o nd = h is t ( se c on d , p o ss 2 ) ;
t hi r d = h is t ( t hi rd , p os s 2 );
f ou r th = h is t ( fo u rt h , p o ss 2 ) ;
15 figure;
s gt it le ( " Ce n tr al L im it T he or em " );
s ub pl o t (2 , 2 ,1 );
ba r(po ss2 , fi rst , " his t") ;
y li m ( [0 ma x ( f ir s t ) + 10 ] );
20 t it le ( "1 00 T hr ow s ") ;
s ub pl o t (2 , 2 ,2 );
ba r ( p os s2 , s ec o nd , " h is t " );
y li m ( [0 ma x ( s ec o n d ) +1 0 ]) ;
25 t it le ( "5 00 T hr ow s ") ;
s ub pl o t (2 , 2 ,3 );
ba r(po ss2 , th ird , " his t") ;
y li m ( [0 ma x ( t hi r d ) + 10 ] );
30 t it le ( "1 .0 00 T hr ow s ") ;
s ub pl o t (2 , 2 ,4 );
ba r ( p os s2 , f ou r th , " h is t " );
y li m ( [0 ma x ( f ou r t h ) +1 0 ]) ;
35 t it le ( "1 00 .00 0 T hr ow s ") ;
B. MATLAB Code used for Data Analysis
l oa d (" p ur e re s u lt s . m at ")
pos s 1 = [1:6 ] ;
pos s 2 = [2:1 2 ] ;
pos s 3 = [3:1 8 ] ;
5pos s 4 = [4:2 4 ] ;
pos s 5 = [5:3 0 ] ;
pos s 6 = [6:3 6 ] ;
m = 3;
n =2 ;
10 d ic e co un t = [ 1: 6 ];
r es _ i de a l1 = h is t ( i de al 1 , p os s 1 );
r es _ i de a l2 = h is t ( i de al 2 , p os s 2 );
r es _ i de a l3 = h is t ( i de al 3 , p os s 3 );
r es _ i de a l4 = h is t ( i de al 4 , p os s 4 );
15 r es _ i de a l5 = h is t ( i de al 5 , p os s 5 );
r es _ i de a l6 = h is t ( i de al 6 , p os s 6 );
r es _ b ro 1 = hi s t ( br o 1 , p o ss 1 ) ;
r es _ b ro 2 = hi s t ( br o 2 , p o ss 2 ) ;
r es _ b ro 3 = hi s t ( br o 3 , p o ss 3 ) ;
20 r es _ b ro 4 = hi s t ( br o 4 , p o ss 4 ) ;
r es _ b ro 5 = hi s t ( br o 5 , p o ss 5 ) ;
r es _ b ro 6 = hi s t ( br o 6 , p o ss 6 ) ;
r es _ c or 1 = hi s t ( co r 1 , p o ss 2 ) ;
25 figure;
s gt it le ( " Id e al C a se " );
s ub p l ot ( m , n , 1 );
ba r ( p os s1 , r e s_ i de a l1 , " h is t " ) ;
y li m ( [0 ma x ( r e s_ i d ea l 1 ) + 10 ] );
30 t it le ( " Di ce C ou nt = 1 ") ;
s ub p l ot ( m , n , 2 );
ba r ( p os s2 , r e s_ i de a l2 , " h is t " ) ;
y li m ( [0 ma x ( r e s_ i d ea l 2 ) + 10 ] );
t it le ( " Di ce C ou nt = 2 ") ;
35 s ub p l ot ( m , n , 3 );
ba r ( p os s3 , r e s_ i de a l3 , " h is t " ) ;
y li m ( [0 ma x ( r e s_ i d ea l 3 ) + 10 ] );
t it le ( " Di ce C ou nt = 3 ") ;
s ub p l ot ( m , n , 4 );
40 ba r ( p os s4 , r e s_ i de a l4 , " h is t " ) ;
y li m ( [0 ma x ( r e s_ i d ea l 4 ) + 10 ] );
t it le ( " Di ce C ou nt = 4 ") ;
s ub p l ot ( m , n , 5 );
ba r ( p os s5 , r e s_ i de a l5 , " h is t " ) ;
45 y li m ( [0 ma x ( r e s_ i d ea l 5 ) + 10 ] );
t it le ( " Di ce C ou nt = 5 ") ;
s ub p l ot ( m , n , 6 );
ba r ( p os s6 , r e s_ i de a l6 , " h is t " ) ;
y li m ( [0 ma x ( r e s_ i d ea l 6 ) + 10 ] );
50 t it le ( " Di ce C ou nt = 6 ") ;
figure;
s gt it le ( " Br o ke n C as e ") ;
s ub p l ot ( m , n , 1 );
55 ba r ( p os s1 , r e s_ b ro 1 ," h i st ") ;
y li m ( [0 ma x ( r e s_ b ro 1 )+ 1 0] ) ;
t it le ( " Di ce C ou nt = 1 ") ;
s ub p l ot ( m , n , 2 );
ba r ( p os s2 , r e s_ b ro 2 ," h i st ") ;
60 y li m ( [0 ma x ( r e s_ b ro 2 )+ 1 0] ) ;
t it le ( " Di ce C ou nt = 2 ") ;
s ub p l ot ( m , n , 3 );
ba r ( p os s3 , r e s_ b ro 3 ," h i st ") ;
y li m ( [0 ma x ( r e s_ b ro 3 )+ 1 0] ) ;
65 t it le ( " Di ce C ou nt = 3 ") ;
s ub p l ot ( m , n , 4 );
ba r ( p os s4 , r e s_ b ro 4 ," h i st ") ;
y li m ( [0 ma x ( r e s_ b ro 4 )+ 1 0] ) ;
t it le ( " Di ce C ou nt = 4 ") ;
70 s ub p l ot ( m , n , 5 );
ba r ( p os s5 , r e s_ b ro 5 ," h i st ") ;
y li m ( [0 ma x ( r e s_ b ro 5 )+ 1 0] ) ;
t it le ( " Di ce C ou nt = 5 ") ;
s ub p l ot ( m , n , 6 );
75 ba r ( p os s6 , r e s_ b ro 6 ," h i st ") ;
y li m ( [0 ma x ( r e s_ b ro 6 )+ 1 0] ) ;
t it le ( " Di ce C ou nt = 6 ") ;
figure;
80 s gt it le ( " Co r re la t ed Ca se ") ;
ba r ( p os s2 , r e s_ c or 1 ," h i st ") ;
y li m ( [0 ma x ( r e s_ c or 1 )+ 1 0] ) ;
figure;
85 s gt it l e (" T wo Di c e C as e ") ;
s ub pl o t (1 , 3 ,1 )
ba r ( p os s2 , r e s_ i de a l2 , " h is t " ) ;
y li m ( [0 ma x ( r e s_ i d ea l 2 ) + 10 ] );
t it le ( " Id ea l C as e ") ;
90 s ub pl o t (1 , 3 ,2 );
ba r ( p os s2 , r e s_ b ro 2 ," h i st ") ;
y li m ( [0 ma x ( r e s_ b ro 2 )+ 1 0] ) ;
t it le ( " Br ok en C as e ") ;
s ub pl o t (1 , 3 ,3 );
95 ba r ( p os s2 , r e s_ c or 1 ," h i st ") ;
y li m ( [0 ma x ( r e s_ c or 1 )+ 1 0] ) ;
t it le ( " Co rr e la t ed C a se " );
s td i de a l = [ s td ( i d ea l 1 ) st d ( i d ea l 2 ) st d ( i de a l 3 )
100 st d ( i de a l 4 ) st d ( i de a l5 ) st d ( i de a l 6 )] ;
s td b ro k e n = [ st d ( b ro 1 ) s td ( b r o2 ) s t d ( br o 3 )
st d ( b ro 4 ) s td ( b r o5 ) s t d ( br o 6 )] ;
s td c or = st d ( c or 1 ) ;
m ea n id e al = [ me a n ( id e al 1 ) m ea n ( i de a l2 ) me a n ( id e al 3 )
105 m ea n ( id e al 4 ) m e an ( i d ea l5 ) me a n ( id e al 6 ) ];
m ea n br o ke n = [ m e an ( b ro 1 ) m ea n ( b ro 2 ) m ea n ( br o 3 )
mean(bro4) mean(bro5) mean(bro6)];
m ea n co r = m e an ( c or 1 ) ;
110 figure;
s ca t t er ( di c ec o un t , st d i de a l , ’ f i ll e d ’ ) ;
h ol d o n ;
sca tt er ( dicec ount , st dbrok en , f ill ed ’) ;
s ca t t er ( 2 , s td c or , ’ f il l e d ’ );
115 g ri d o n ;
y la be l ( " S ta n da r d D ev i at i on \ s ig m a ") ;
x la be l (" D ic e C ou n t ") ;
leg e n d ( [" I d eal " "Br o k en " " C o r rela t e d "] );
120 figure;
sca tt er ( dicec ount , me anide al , f ill ed ’) ;
h ol d o n ;
s ca t t er ( di c ec o un t , m ea n br o ke n , ’ f il l e d ’ );
s ca t t er ( 2 , m ea n co r , ’ fi l l ed ’) ;
125 g ri d o n ;
y la be l (" M ea n " );
x la be l (" D ic e C ou n t ") ;
leg e n d ( [" I d eal " "Br o k en " " C o r rela t e d "] );
ResearchGate has not been able to resolve any citations for this publication.
ResearchGate has not been able to resolve any references for this publication.