SlideShare uma empresa Scribd logo
1 de 22
Generate and Test Random Numbers Eng. MshariAlabdulkarim
Generate and Test Random Numbers Generate and Test Random Numbers Random Number Generation
Generate and Test Random Numbers Generate and Test Random Numbers Types of Random-number Generators: ,[object Object]
Inversive Generators.,[object Object]
In the simulation of a complex networks, where there are a huge number of users running lots of programs.,[object Object]
If Wi,1, Wi,2,..., Wi,kare independent, discrete-valued random variables, and Wi,1 is uniformly distributed between 0 and m1 – 2, then:    is also uniformly distributed between 0 and m1 – 2.
Generate and Test Random Numbers Generate and Test Random Numbers Combined Linear Congruential Generators (Cont): ,[object Object],With: The maximum possible period will be:
Generate and Test Random Numbers Generate and Test Random Numbers Example: Two generators “k = 2”, a1 = 40014, m1 = 2147483563, a2 = 40692, m2 = 2147483399. Algorithm: Choose two seeds, X1,0 from [1, 2147483562] and X2,0 from [1, 2147483398], Set j = 0. Calculate the values from the two generators:  Then calculate: After that return: Finally:                              j = j + 1, and then go back to step number 2.
Generate and Test Random Numbers Generate and Test Random Numbers Example (Cont.): Period:
Generate and Test Random Numbers Generate and Test Random Numbers InversiveCongruential Generator : ,[object Object]
 The standard formula for an inversivecongruential generator is:,[object Object]
Generate and Test Random Numbers Generate and Test Random Numbers Types of Random-number Testors: ,[object Object]
 Runs Tests.,[object Object]
Designed for continuous distributions.
Difference between the observed CDF (cumulative distribution function) Fo(x) and the expected cdf Fe(x) should be small.Observed Expected
Generate and Test Random Numbers Generate and Test Random Numbers Kolmogorov-Smirnov Test :
Generate and Test Random Numbers Generate and Test Random Numbers Example:
Generate and Test Random Numbers Generate and Test Random Numbers Example (Cont.):
Generate and Test Random Numbers Generate and Test Random Numbers Example (Cont.):
Generate and Test Random Numbers Generate and Test Random Numbers Example (Cont.):
Generate and Test Random Numbers Generate and Test Random Numbers Run Tests (Runs up and runs down): ,[object Object]
A run is defined as a succession of similar events preceded and followed by different event.

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Random number generation
Random number generationRandom number generation
Random number generation
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)
 
Fuzzy inference systems
Fuzzy inference systemsFuzzy inference systems
Fuzzy inference systems
 
Pseudo Random Number Generators
Pseudo Random Number GeneratorsPseudo Random Number Generators
Pseudo Random Number Generators
 
Genetic algorithm ppt
Genetic algorithm pptGenetic algorithm ppt
Genetic algorithm ppt
 
Discrete event simulation
Discrete event simulationDiscrete event simulation
Discrete event simulation
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Monte carlo
Monte carloMonte carlo
Monte carlo
 
Introduction to simulation and modeling
Introduction to simulation and modelingIntroduction to simulation and modeling
Introduction to simulation and modeling
 
Expert system neural fuzzy system
Expert system neural fuzzy systemExpert system neural fuzzy system
Expert system neural fuzzy system
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Chapter 4 part1-Probability Model
Chapter 4 part1-Probability ModelChapter 4 part1-Probability Model
Chapter 4 part1-Probability Model
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Random variate generation
Random variate generationRandom variate generation
Random variate generation
 
Modelling simulation (1)
Modelling simulation (1)Modelling simulation (1)
Modelling simulation (1)
 
Soft computing
Soft computingSoft computing
Soft computing
 
RM 701 Genetic Algorithm and Fuzzy Logic lecture
RM 701 Genetic Algorithm and Fuzzy Logic lectureRM 701 Genetic Algorithm and Fuzzy Logic lecture
RM 701 Genetic Algorithm and Fuzzy Logic lecture
 
Monte carlo simulation
Monte carlo simulationMonte carlo simulation
Monte carlo simulation
 

Destaque

Simulation-Run-Statistics
Simulation-Run-StatisticsSimulation-Run-Statistics
Simulation-Run-Statisticssadiksha kafle
 
Power Point Presentation
Power Point PresentationPower Point Presentation
Power Point PresentationS P Sajjan
 
Poisson distribution
Poisson distributionPoisson distribution
Poisson distributionStudent
 
Much ado about randomness. What is really a random number?
Much ado about randomness. What is really a random number?Much ado about randomness. What is really a random number?
Much ado about randomness. What is really a random number?Aleksandr Yampolskiy
 
Poisson distribution
Poisson distributionPoisson distribution
Poisson distributionAntiqNyke
 
Pseudorandom number generators powerpoint
Pseudorandom number generators powerpointPseudorandom number generators powerpoint
Pseudorandom number generators powerpointDavid Roodman
 
Simulation in terminated system
Simulation in terminated system Simulation in terminated system
Simulation in terminated system Saleem Almaqashi
 

Destaque (9)

Simulation-Run-Statistics
Simulation-Run-StatisticsSimulation-Run-Statistics
Simulation-Run-Statistics
 
Power Point Presentation
Power Point PresentationPower Point Presentation
Power Point Presentation
 
Poisson distribution
Poisson distributionPoisson distribution
Poisson distribution
 
Much ado about randomness. What is really a random number?
Much ado about randomness. What is really a random number?Much ado about randomness. What is really a random number?
Much ado about randomness. What is really a random number?
 
Matlab Distributions
Matlab DistributionsMatlab Distributions
Matlab Distributions
 
Poisson distribution
Poisson distributionPoisson distribution
Poisson distribution
 
Pseudorandom number generators powerpoint
Pseudorandom number generators powerpointPseudorandom number generators powerpoint
Pseudorandom number generators powerpoint
 
Simulation in terminated system
Simulation in terminated system Simulation in terminated system
Simulation in terminated system
 
Input modeling
Input modelingInput modeling
Input modeling
 

Semelhante a Generate and test random numbers

AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...cscpconf
 
Math presentation
Math presentationMath presentation
Math presentationRaselKhan48
 
Simple lin regress_inference
Simple lin regress_inferenceSimple lin regress_inference
Simple lin regress_inferenceKemal İnciroğlu
 
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular AutomataCost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automataijait
 
Advanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptxAdvanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptxakashayosha
 
UNIT - I Reinforcement Learning .pptx
UNIT - I Reinforcement Learning .pptxUNIT - I Reinforcement Learning .pptx
UNIT - I Reinforcement Learning .pptxDrUdayKiranG
 
1608 probability and statistics in engineering
1608 probability and statistics in engineering1608 probability and statistics in engineering
1608 probability and statistics in engineeringDr Fereidoun Dejahang
 
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)Ivan Corneillet
 
Trust Measurement Presentation_Part 3
Trust Measurement Presentation_Part 3Trust Measurement Presentation_Part 3
Trust Measurement Presentation_Part 3Gan Chun Chet
 
Simulation - Generating Continuous Random Variables
Simulation - Generating Continuous Random VariablesSimulation - Generating Continuous Random Variables
Simulation - Generating Continuous Random VariablesMartin Kretzer
 
Numerical Methods
Numerical MethodsNumerical Methods
Numerical MethodsESUG
 
Chi-squared Goodness of Fit Test Project Overview and.docx
Chi-squared Goodness of Fit Test Project  Overview and.docxChi-squared Goodness of Fit Test Project  Overview and.docx
Chi-squared Goodness of Fit Test Project Overview and.docxbissacr
 
Monte Carlo Simulation lecture.pdf
Monte Carlo Simulation lecture.pdfMonte Carlo Simulation lecture.pdf
Monte Carlo Simulation lecture.pdfWellingtonIsraelQuim
 
Chi-squared Goodness of Fit Test Project Overview and.docx
Chi-squared Goodness of Fit Test Project  Overview and.docxChi-squared Goodness of Fit Test Project  Overview and.docx
Chi-squared Goodness of Fit Test Project Overview and.docxmccormicknadine86
 

Semelhante a Generate and test random numbers (20)

AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
 
Math presentation
Math presentationMath presentation
Math presentation
 
Simple lin regress_inference
Simple lin regress_inferenceSimple lin regress_inference
Simple lin regress_inference
 
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular AutomataCost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
 
Advanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptxAdvanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptx
 
Or ppt,new
Or ppt,newOr ppt,new
Or ppt,new
 
UNIT - I Reinforcement Learning .pptx
UNIT - I Reinforcement Learning .pptxUNIT - I Reinforcement Learning .pptx
UNIT - I Reinforcement Learning .pptx
 
1608 probability and statistics in engineering
1608 probability and statistics in engineering1608 probability and statistics in engineering
1608 probability and statistics in engineering
 
Stats chapter 15
Stats chapter 15Stats chapter 15
Stats chapter 15
 
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)
Monte Carlo Simulations (UC Berkeley School of Information; July 11, 2019)
 
Week08.pdf
Week08.pdfWeek08.pdf
Week08.pdf
 
Trust Measurement Presentation_Part 3
Trust Measurement Presentation_Part 3Trust Measurement Presentation_Part 3
Trust Measurement Presentation_Part 3
 
Simulation - Generating Continuous Random Variables
Simulation - Generating Continuous Random VariablesSimulation - Generating Continuous Random Variables
Simulation - Generating Continuous Random Variables
 
PhysicsSIG2008-01-Seneviratne
PhysicsSIG2008-01-SeneviratnePhysicsSIG2008-01-Seneviratne
PhysicsSIG2008-01-Seneviratne
 
SE%200-Testing%20(2).pptx
SE%200-Testing%20(2).pptxSE%200-Testing%20(2).pptx
SE%200-Testing%20(2).pptx
 
Numerical Methods
Numerical MethodsNumerical Methods
Numerical Methods
 
Chi-squared Goodness of Fit Test Project Overview and.docx
Chi-squared Goodness of Fit Test Project  Overview and.docxChi-squared Goodness of Fit Test Project  Overview and.docx
Chi-squared Goodness of Fit Test Project Overview and.docx
 
Monte Carlo Simulation lecture.pdf
Monte Carlo Simulation lecture.pdfMonte Carlo Simulation lecture.pdf
Monte Carlo Simulation lecture.pdf
 
Chi-squared Goodness of Fit Test Project Overview and.docx
Chi-squared Goodness of Fit Test Project  Overview and.docxChi-squared Goodness of Fit Test Project  Overview and.docx
Chi-squared Goodness of Fit Test Project Overview and.docx
 
Software Testing
Software TestingSoftware Testing
Software Testing
 

Mais de Mshari Alabdulkarim

Qo s provisioning for scalable video streaming over ad hoc networks using cro...
Qo s provisioning for scalable video streaming over ad hoc networks using cro...Qo s provisioning for scalable video streaming over ad hoc networks using cro...
Qo s provisioning for scalable video streaming over ad hoc networks using cro...Mshari Alabdulkarim
 
Improving Direct-Mapped Cache Performance by the Addition of a Small Fully-As...
Improving Direct-Mapped Cache Performance by the Addition of a Small Fully-As...Improving Direct-Mapped Cache Performance by the Addition of a Small Fully-As...
Improving Direct-Mapped Cache Performance by the Addition of a Small Fully-As...Mshari Alabdulkarim
 
Power Saving in Wireless Sensor Networks
Power Saving in Wireless Sensor NetworksPower Saving in Wireless Sensor Networks
Power Saving in Wireless Sensor NetworksMshari Alabdulkarim
 

Mais de Mshari Alabdulkarim (6)

Qo s provisioning for scalable video streaming over ad hoc networks using cro...
Qo s provisioning for scalable video streaming over ad hoc networks using cro...Qo s provisioning for scalable video streaming over ad hoc networks using cro...
Qo s provisioning for scalable video streaming over ad hoc networks using cro...
 
Ad-Hoc Networks
Ad-Hoc NetworksAd-Hoc Networks
Ad-Hoc Networks
 
Improving Direct-Mapped Cache Performance by the Addition of a Small Fully-As...
Improving Direct-Mapped Cache Performance by the Addition of a Small Fully-As...Improving Direct-Mapped Cache Performance by the Addition of a Small Fully-As...
Improving Direct-Mapped Cache Performance by the Addition of a Small Fully-As...
 
WPA2
WPA2WPA2
WPA2
 
Power Saving in Wireless Sensor Networks
Power Saving in Wireless Sensor NetworksPower Saving in Wireless Sensor Networks
Power Saving in Wireless Sensor Networks
 
CDMA
CDMACDMA
CDMA
 

Último

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Último (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Generate and test random numbers

  • 1. Generate and Test Random Numbers Eng. MshariAlabdulkarim
  • 2. Generate and Test Random Numbers Generate and Test Random Numbers Random Number Generation
  • 3.
  • 4.
  • 5.
  • 6. If Wi,1, Wi,2,..., Wi,kare independent, discrete-valued random variables, and Wi,1 is uniformly distributed between 0 and m1 – 2, then: is also uniformly distributed between 0 and m1 – 2.
  • 7.
  • 8. Generate and Test Random Numbers Generate and Test Random Numbers Example: Two generators “k = 2”, a1 = 40014, m1 = 2147483563, a2 = 40692, m2 = 2147483399. Algorithm: Choose two seeds, X1,0 from [1, 2147483562] and X2,0 from [1, 2147483398], Set j = 0. Calculate the values from the two generators: Then calculate: After that return: Finally: j = j + 1, and then go back to step number 2.
  • 9. Generate and Test Random Numbers Generate and Test Random Numbers Example (Cont.): Period:
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Designed for continuous distributions.
  • 15. Difference between the observed CDF (cumulative distribution function) Fo(x) and the expected cdf Fe(x) should be small.Observed Expected
  • 16. Generate and Test Random Numbers Generate and Test Random Numbers Kolmogorov-Smirnov Test :
  • 17. Generate and Test Random Numbers Generate and Test Random Numbers Example:
  • 18. Generate and Test Random Numbers Generate and Test Random Numbers Example (Cont.):
  • 19. Generate and Test Random Numbers Generate and Test Random Numbers Example (Cont.):
  • 20. Generate and Test Random Numbers Generate and Test Random Numbers Example (Cont.):
  • 21.
  • 22. A run is defined as a succession of similar events preceded and followed by different event.
  • 23. The length of the run is the number of events that occur in the run.
  • 24. There are two Concerns in a runs test:Number of runs. Length of runs.
  • 25.
  • 26. If α is the total number of runs in a truly random sequence, then:
  • 27. Mean:
  • 29. For N > 20, the distribution of “a” approximated by a normal distribution, N(ma , ).This approximation can be used to test the independence of numbers from a generator.
  • 30.
  • 31. Failure to reject the hypothesis of independence occurs when: Where α is the level of significance. Fail to reject
  • 32.
  • 33. The sequence of runs up and down is as follows:+ + + -+-+- - - + + -+- - +-+- - +- - +-+ + - - + + -+- - + + -
  • 34.
  • 35. Now, the critical value is Z0.025 = 1.96, so the independence of the numbers cannot be rejected on the basis of this test.