Get startedGet started for free

Understanding random seeds

While random numbers are important for many analyses, they create a problem: the results you get can vary slightly. This can cause awkward conversations with your boss when your script for calculating the sales forecast gives different answers each time.

Setting the seed for numpy's random number generator helps avoid such problems by making the random number generation reproducible.

This exercise is part of the course

Sampling in Python

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise