Lua Statistics Library

I’ve created a GitHub repository for a new open-source Lua module, built primarily for Roblox. It’s name is Lua Statistics (moved to be owned by Bytebit).

As a graduating computer science major, and especially as one who studies artificial intelligence as a depth area, I’ve gotten very used to using probability distributions and statistical functions in my projects. However, in Roblox, I’ve always sort of just written my own functions to do this. I decided to put those functions together, clean them up, and open-source them!

My goal for this library is for it to grow into a much more useful tool than it is now as others are now able to write probability distribution functions and contribute. I hope for this to become a great example of what the Roblox developer community can accomplish when we work together on an open-source project, as other projects have already done a great job of demonstrating.

So far, this library has the common statistical functions such as finding the mean, median, and mode of a sample. It can also calculate the variance and standard deviation of a sample.

More importantly, though, it has several functions that use the standard uniform distribution of math.random() and creates other distribution functions, such as the Gaussian / normal distribution, exponential distribution, binomial distribution, and even the standard discrete distribution that I find myself using extremely often as an indie Roblox game developer.

If you have any ideas for what else to add, let me know or feel free to send a pull request of your own!

35 Likes

Looks nice!

Awesome work ! Thank you for providing this