Skip to content

tylerneylon/distribution_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Distribution test

This code empirically tests an algorithm I wrote to solve the following problem:

Write a linear-time algorith which generates n random values x_1, x_2, ...
x_n in [0, 1] with the same distribution that would have arisen if we'd
generated each value independently and uniformly in [0, 1] and then sorted
them into x_1 ≤ x_2 ≤ ... ≤ x_n.

This is my paraphrasing of problem 29 from section 3.4.1 of The Art of Computer Programming, vol 2, 3rd edition, by Donald Knuth.

Run the code like so:

lua distn_test.lua

About

Quick code to test some code to generate certain random variables.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages