Git Product home page Git Product logo

Comments (3)

gburtini avatar gburtini commented on June 24, 2024

I would be happy to promote the usage of the new random_ methods once they are inside our expected support window. I intend to deprecate the 5.x series soon for this project, but I don't want to remove backwards compatibility solely for the sake of breaking things.

Importantly, however, this is not a cryptographic library. That said, the cryptographic tests of randomness might have some interesting value in terms of what we mean by, say, "drawing from a uniform distribution." If there were a case to be made for this today, I would be willing to put a function_exists or userland polyfill style implementation in place.

from probability-distributions-for-php.

wmelton avatar wmelton commented on June 24, 2024

Exactly - while definitely not a cryptographic library, it would seem that the 'true' randomness of a distribution is important when being used for A/B testing or optimizations. If PHP documentation is correct, random_int() "should" produce a more truly reliable, mathematically correct result.

from probability-distributions-for-php.

gburtini avatar gburtini commented on June 24, 2024

This fundamentally comes down to what it means to be "truly" random. A question I've struggled with for a long time and is probably outside the scope of this chat. There are, however, a number of tests used to define true randomness.

I believe we should meet all the tests that would matter for that use case using Mersenne Twister, but it would be worth eventually adding unit tests to this library that ensure that is the case, to the extent they are meaningful.

For example, the Diehard tests or TestU01. I am not particularly familiar with the cryptographic randomness test suites, but the non-cryptographic properties should be sufficient with respect to A/B testing or any of the other common applications of these distributions like memoryless cache expiration or Monte Carlo simulations. Cryptographic tests aim to understand the impact of a form of randomness in a world where there is an active adversary.

from probability-distributions-for-php.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.