SlideShare a Scribd company logo
1 of 19
Random Number
Generation

© neo
INDEPENDENCE TEST
• Autocorrelation Test
• Gap Test
• Poker Test

© neo
AUTOCORRELATION TEST

© neo
AUTOCORRELATION TEST
• The tests for Autocorrelation are
concerned with the dependence between
numbers in a sequence. For eg.
0.12
0.99
0.68

0.01
0.15
0.49

0.23
0.33
0.05

0.28
0.35
0.43

0.89
0.91
0.95

0.31
0.41
0.58

0.64
0.60
0.19

0.28
0.27
0.36

0.83
0.75
0.69

0.93
0.88
0.87

© neo
AUTOCORRELATION TEST
• From a visual inspection, these numbers
appear to be random, and they would
probably pass all tests presented to this
point.
0.12
0.99
0.68

0.01
0.15
0.49

0.23
0.33
0.05

0.28
0.35
0.43

0.89
0.91
0.95

0.31
0.41
0.58

0.64
0.60
0.19

0.28
0.27
0.36

0.83
0.75
0.69

0.93
0.88
0.87

© neo
AUTOCORRELATION TEST
• From a visual inspection, these numbers
appear to be random, and they would
probably pass all tests presented to this
point.
0.12
0.99
0.68

0.01
0.15
0.49

0.23
0.33
0.05

0.28
0.35
0.43

0.89
0.91
0.95

0.31
0.41
0.58

0.64
0.60
0.19

0.28
0.27
0.36

0.83
0.75
0.69

0.93
0.88
0.87

© neo
AUTOCORRELATION TEST
• The test requires the computation of
autocorrelation between every m numbers,
starting with the ith number .
• Thus the autocorrelation ρim between the
following numbers would be of interest:
Ri , Ri+m, Ri+2m, .. .. .. .., Ri+(M+1)m.
AUTOCORRELATION TEST
• Where M is the largest integer such that
i+(M+1)m<=N , where N is total number of
values in sequence.
• A nonzero autocorrelation implies a lack
of independence, so following two tailed test
is appropriate: H0 : ρim = 0
H1 : ρim ×= 0
AUTOCORRELATION TEST
• For large values of M, the distribution of
the estimator of ρim , denoted ρim is
̂
approximately normal if the values Ri , Ri+m,
Ri+2m, .. .. .. .., Ri+(M+1)m are uncorrelated, then
the statistics can be as follows:
Z0 = ρ̂ im

σρ

im
GAP TEST

© neo
GAP TEST
• For each Uj in certain range, this test
examines the length of ‘Gap’ between this
element and the next element to fall in that
range.
•So if ä and ß are two real numbers such that
0 <= ä < ß <= 1 we are looking for the length
of consecutive subsequences Uj, Uj+1,.. , Uj+(r+1)

© neo
GAP TEST
• Such that Uj and Uj+(r+1) are between ä and ß
but the other elements in the subsequence are
not (this is a gap of length r).
•We would then perform chi-squared test on
the results using the different lengths of
gaps as the categories, and the probabilities
are as follows:

© neo
GAP TEST
• Such that Uj and Uj+(r+1) are between ä and ß
but the other elements in the subsequence are
not (this is a gap of length r).
•We would then perform chi-squared test on
the results using the different lengths of
gaps as the categories, and the probabilities
are as follows:

© neo
GAP TEST
2

k

p0 = p, p1= p(1-p), p2= p(1-p) , .. .., pk= p(1-p)
Here p= ß - ä which is probability
that any element Uj is between ä
and ß

© neo
POKER TEST

© neo
POKER TEST
• As with the gap test, the name of the poker
test suggests its description. We examine n
groups of five consecutive integers, and put
each of these groups into one of the
following categories:

© neo
POKER TEST
•All different: ABCDE
•One pair:
AABCD
•Two pairs:
AABBC
•Three of a kind: AAABC
•Full house:
AAABB
•Four of a kind: AAAAB
•Five of a kind: AAAAA

© neo
POKER TEST
• In a more intuitive way, let us consider a
hand of k cards from k dierent cards.
• The probability to have exactly c different
cards is
P(C=c) = 1

k!
k

k

(k-c)!

c

2Sk

© neo
Thank you

© neo

More Related Content

What's hot

Stochastic Process
Stochastic ProcessStochastic Process
Stochastic Process
knksmart
 

What's hot (20)

Introduction to optimization Problems
Introduction to optimization ProblemsIntroduction to optimization Problems
Introduction to optimization Problems
 
Gradient descent method
Gradient descent methodGradient descent method
Gradient descent method
 
Output analysis for simulation models / Elimination of initial Bias
Output analysis for simulation models / Elimination of initial BiasOutput analysis for simulation models / Elimination of initial Bias
Output analysis for simulation models / Elimination of initial Bias
 
Arima model (time series)
Arima model (time series)Arima model (time series)
Arima model (time series)
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical Analysis
 
Random number generator
Random number generatorRandom number generator
Random number generator
 
Introduction to simulation modeling
Introduction to simulation modelingIntroduction to simulation modeling
Introduction to simulation modeling
 
Random number generation
Random number generationRandom number generation
Random number generation
 
Queuing unit v ppt
Queuing unit v pptQueuing unit v ppt
Queuing unit v ppt
 
System Modeling & Simulation Introduction
System Modeling & Simulation  IntroductionSystem Modeling & Simulation  Introduction
System Modeling & Simulation Introduction
 
Time Series Analysis Ravi
Time Series Analysis RaviTime Series Analysis Ravi
Time Series Analysis Ravi
 
Activation functions
Activation functionsActivation functions
Activation functions
 
ARIMA
ARIMA ARIMA
ARIMA
 
Tora (2 phase itteration, simplex method)
Tora (2 phase itteration, simplex method)Tora (2 phase itteration, simplex method)
Tora (2 phase itteration, simplex method)
 
Stochastic Process
Stochastic ProcessStochastic Process
Stochastic Process
 
Hash tables
Hash tablesHash tables
Hash tables
 
basics of stochastic and queueing theory
basics of stochastic and queueing theorybasics of stochastic and queueing theory
basics of stochastic and queueing theory
 
Simulated annealing
Simulated annealingSimulated annealing
Simulated annealing
 
Simulated Annealing - A Optimisation Technique
Simulated Annealing - A Optimisation TechniqueSimulated Annealing - A Optimisation Technique
Simulated Annealing - A Optimisation Technique
 
Queueing theory
Queueing theoryQueueing theory
Queueing theory
 

Viewers also liked (7)

Power Point Presentation
Power Point PresentationPower Point Presentation
Power Point Presentation
 
Simulation-Run-Statistics
Simulation-Run-StatisticsSimulation-Run-Statistics
Simulation-Run-Statistics
 
Random variate generation
Random variate generationRandom variate generation
Random variate generation
 
Pseudo Random Number Generators
Pseudo Random Number GeneratorsPseudo Random Number Generators
Pseudo Random Number Generators
 
Simulation in terminated system
Simulation in terminated system Simulation in terminated system
Simulation in terminated system
 
Pseudorandom number generators powerpoint
Pseudorandom number generators powerpointPseudorandom number generators powerpoint
Pseudorandom number generators powerpoint
 
Input modeling
Input modelingInput modeling
Input modeling
 

Similar to Random Number Generation

2Multi_armed_bandits.pptx
2Multi_armed_bandits.pptx2Multi_armed_bandits.pptx
2Multi_armed_bandits.pptx
ZhiwuGuo1
 

Similar to Random Number Generation (20)

Admission in India
Admission in IndiaAdmission in India
Admission in India
 
ERF Training Workshop Panel Data 5
ERF Training WorkshopPanel Data 5ERF Training WorkshopPanel Data 5
ERF Training Workshop Panel Data 5
 
Enm fy17nano qsar
Enm fy17nano qsarEnm fy17nano qsar
Enm fy17nano qsar
 
Optimization of sample configurations for variogram estimation
Optimization of sample configurations for variogram estimationOptimization of sample configurations for variogram estimation
Optimization of sample configurations for variogram estimation
 
2Multi_armed_bandits.pptx
2Multi_armed_bandits.pptx2Multi_armed_bandits.pptx
2Multi_armed_bandits.pptx
 
AEN-VAR-AEN.pdf
AEN-VAR-AEN.pdfAEN-VAR-AEN.pdf
AEN-VAR-AEN.pdf
 
ACF.ppt
ACF.pptACF.ppt
ACF.ppt
 
LectureSlides3.pdf
LectureSlides3.pdfLectureSlides3.pdf
LectureSlides3.pdf
 
Asymptotic Notations.pptx
Asymptotic Notations.pptxAsymptotic Notations.pptx
Asymptotic Notations.pptx
 
ARIMA Model.ppt
ARIMA Model.pptARIMA Model.ppt
ARIMA Model.ppt
 
ARIMA Model for analysis of time series data.ppt
ARIMA Model for analysis of time series data.pptARIMA Model for analysis of time series data.ppt
ARIMA Model for analysis of time series data.ppt
 
ARIMA Model.ppt
ARIMA Model.pptARIMA Model.ppt
ARIMA Model.ppt
 
BIIntro.ppt
BIIntro.pptBIIntro.ppt
BIIntro.ppt
 
Lecture1
Lecture1Lecture1
Lecture1
 
슬로우캠퍼스: scikit-learn & 머신러닝 (강박사)
슬로우캠퍼스:  scikit-learn & 머신러닝 (강박사)슬로우캠퍼스:  scikit-learn & 머신러닝 (강박사)
슬로우캠퍼스: scikit-learn & 머신러닝 (강박사)
 
Statistical Process Control
Statistical Process ControlStatistical Process Control
Statistical Process Control
 
Elementary statistical inference1
Elementary statistical inference1Elementary statistical inference1
Elementary statistical inference1
 
Asymptotics 140510003721-phpapp02
Asymptotics 140510003721-phpapp02Asymptotics 140510003721-phpapp02
Asymptotics 140510003721-phpapp02
 
Mixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect InteractionsMixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect Interactions
 
Lecture slides week14-15
Lecture slides week14-15Lecture slides week14-15
Lecture slides week14-15
 

Recently uploaded

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 

Recently uploaded (20)

male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 

Random Number Generation

  • 2. INDEPENDENCE TEST • Autocorrelation Test • Gap Test • Poker Test © neo
  • 4. AUTOCORRELATION TEST • The tests for Autocorrelation are concerned with the dependence between numbers in a sequence. For eg. 0.12 0.99 0.68 0.01 0.15 0.49 0.23 0.33 0.05 0.28 0.35 0.43 0.89 0.91 0.95 0.31 0.41 0.58 0.64 0.60 0.19 0.28 0.27 0.36 0.83 0.75 0.69 0.93 0.88 0.87 © neo
  • 5. AUTOCORRELATION TEST • From a visual inspection, these numbers appear to be random, and they would probably pass all tests presented to this point. 0.12 0.99 0.68 0.01 0.15 0.49 0.23 0.33 0.05 0.28 0.35 0.43 0.89 0.91 0.95 0.31 0.41 0.58 0.64 0.60 0.19 0.28 0.27 0.36 0.83 0.75 0.69 0.93 0.88 0.87 © neo
  • 6. AUTOCORRELATION TEST • From a visual inspection, these numbers appear to be random, and they would probably pass all tests presented to this point. 0.12 0.99 0.68 0.01 0.15 0.49 0.23 0.33 0.05 0.28 0.35 0.43 0.89 0.91 0.95 0.31 0.41 0.58 0.64 0.60 0.19 0.28 0.27 0.36 0.83 0.75 0.69 0.93 0.88 0.87 © neo
  • 7. AUTOCORRELATION TEST • The test requires the computation of autocorrelation between every m numbers, starting with the ith number . • Thus the autocorrelation ρim between the following numbers would be of interest: Ri , Ri+m, Ri+2m, .. .. .. .., Ri+(M+1)m.
  • 8. AUTOCORRELATION TEST • Where M is the largest integer such that i+(M+1)m<=N , where N is total number of values in sequence. • A nonzero autocorrelation implies a lack of independence, so following two tailed test is appropriate: H0 : ρim = 0 H1 : ρim ×= 0
  • 9. AUTOCORRELATION TEST • For large values of M, the distribution of the estimator of ρim , denoted ρim is ̂ approximately normal if the values Ri , Ri+m, Ri+2m, .. .. .. .., Ri+(M+1)m are uncorrelated, then the statistics can be as follows: Z0 = ρ̂ im σρ im
  • 11. GAP TEST • For each Uj in certain range, this test examines the length of ‘Gap’ between this element and the next element to fall in that range. •So if ä and ß are two real numbers such that 0 <= ä < ß <= 1 we are looking for the length of consecutive subsequences Uj, Uj+1,.. , Uj+(r+1) © neo
  • 12. GAP TEST • Such that Uj and Uj+(r+1) are between ä and ß but the other elements in the subsequence are not (this is a gap of length r). •We would then perform chi-squared test on the results using the different lengths of gaps as the categories, and the probabilities are as follows: © neo
  • 13. GAP TEST • Such that Uj and Uj+(r+1) are between ä and ß but the other elements in the subsequence are not (this is a gap of length r). •We would then perform chi-squared test on the results using the different lengths of gaps as the categories, and the probabilities are as follows: © neo
  • 14. GAP TEST 2 k p0 = p, p1= p(1-p), p2= p(1-p) , .. .., pk= p(1-p) Here p= ß - ä which is probability that any element Uj is between ä and ß © neo
  • 16. POKER TEST • As with the gap test, the name of the poker test suggests its description. We examine n groups of five consecutive integers, and put each of these groups into one of the following categories: © neo
  • 17. POKER TEST •All different: ABCDE •One pair: AABCD •Two pairs: AABBC •Three of a kind: AAABC •Full house: AAABB •Four of a kind: AAAAB •Five of a kind: AAAAA © neo
  • 18. POKER TEST • In a more intuitive way, let us consider a hand of k cards from k dierent cards. • The probability to have exactly c different cards is P(C=c) = 1 k! k k (k-c)! c 2Sk © neo