Generate random numbers from probability distributions (uniform, normal, binomial) or sample from custom lists. Ideal for simulations, Monte Carlo methods, statistical analysis, and randomization tasks. Set seeds for reproducibility, visualize distributions with histograms, and export data for use in spreadsheets or statistical software.
Leave empty for truly random results
Max: 10,000 samples
Random sampling is a technique where each member of a population has an equal chance of being selected. This ensures unbiased samples and enables valid statistical inference in research, surveys, and experiments.
Currently supports three fundamental distributions, with more distributions (exponential, Poisson, chi-square, t-distribution, etc.) coming soon.
All values in a range are equally likely. Useful for generating random numbers between two bounds or simulating equally probable outcomes.
The bell curve distribution. Most values cluster around the mean, with fewer values farther away. Fundamental to the Central Limit Theorem and most statistical inference.
Models the number of successes in n independent trials, each with probability p. Common in quality control, genetics, and success/failure experiments.
A random seed initializes the random number generator to produce a specific sequence of "random" numbers. Using the same seed will always produce the same sequence, which is essential for:
This random number generator is useful for:
library(tidyverse)
# Parameters
population <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
sample_size <- 5
with_replacement <- FALSE
# Set seed for reproducibility
set.seed(42)
# Sample from population
sample_data <- sample(population, size = sample_size, replace = with_replacement)
print(sample_data)import numpy as np
# Parameters
population = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
sample_size = 5
with_replacement = False
# Set seed for reproducibility
np.random.seed(42)
# Sample from population
sample_data = np.random.choice(population, size=sample_size, replace=with_replacement)
print(sample_data)library(tidyverse)
# Set seed for reproducibility
set.seed(42)
# Normal distribution
normal_sample <- rnorm(n = 100, mean = 50, sd = 10)
print(head(normal_sample))
print(paste("Mean:", round(mean(normal_sample), 2)))
print(paste("SD:", round(sd(normal_sample), 2)))
# Uniform distribution
uniform_sample <- runif(n = 100, min = 0, max = 100)
# Binomial distribution
binomial_sample <- rbinom(n = 100, size = 10, prob = 0.5)
# Histogram
hist(normal_sample, main = "Normal Distribution Sample",
xlab = "Value", col = "lightblue", breaks = 20)import numpy as np
import matplotlib.pyplot as plt
# Set seed for reproducibility
np.random.seed(42)
# Normal distribution
normal_sample = np.random.normal(loc=50, scale=10, size=100)
print(f"Mean: {np.mean(normal_sample):.2f}")
print(f"SD: {np.std(normal_sample, ddof=1):.2f}")
# Uniform distribution
uniform_sample = np.random.uniform(low=0, high=100, size=100)
# Binomial distribution
binomial_sample = np.random.binomial(n=10, p=0.5, size=100)
# Histogram
plt.hist(normal_sample, bins=20, color='lightblue', edgecolor='black')
plt.title('Normal Distribution Sample')
plt.xlabel('Value')
plt.ylabel('Frequency')
plt.show()Generate random numbers from probability distributions (uniform, normal, binomial) or sample from custom lists. Ideal for simulations, Monte Carlo methods, statistical analysis, and randomization tasks. Set seeds for reproducibility, visualize distributions with histograms, and export data for use in spreadsheets or statistical software.
Leave empty for truly random results
Max: 10,000 samples
Random sampling is a technique where each member of a population has an equal chance of being selected. This ensures unbiased samples and enables valid statistical inference in research, surveys, and experiments.
Currently supports three fundamental distributions, with more distributions (exponential, Poisson, chi-square, t-distribution, etc.) coming soon.
All values in a range are equally likely. Useful for generating random numbers between two bounds or simulating equally probable outcomes.
The bell curve distribution. Most values cluster around the mean, with fewer values farther away. Fundamental to the Central Limit Theorem and most statistical inference.
Models the number of successes in n independent trials, each with probability p. Common in quality control, genetics, and success/failure experiments.
A random seed initializes the random number generator to produce a specific sequence of "random" numbers. Using the same seed will always produce the same sequence, which is essential for:
This random number generator is useful for:
library(tidyverse)
# Parameters
population <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
sample_size <- 5
with_replacement <- FALSE
# Set seed for reproducibility
set.seed(42)
# Sample from population
sample_data <- sample(population, size = sample_size, replace = with_replacement)
print(sample_data)import numpy as np
# Parameters
population = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
sample_size = 5
with_replacement = False
# Set seed for reproducibility
np.random.seed(42)
# Sample from population
sample_data = np.random.choice(population, size=sample_size, replace=with_replacement)
print(sample_data)library(tidyverse)
# Set seed for reproducibility
set.seed(42)
# Normal distribution
normal_sample <- rnorm(n = 100, mean = 50, sd = 10)
print(head(normal_sample))
print(paste("Mean:", round(mean(normal_sample), 2)))
print(paste("SD:", round(sd(normal_sample), 2)))
# Uniform distribution
uniform_sample <- runif(n = 100, min = 0, max = 100)
# Binomial distribution
binomial_sample <- rbinom(n = 100, size = 10, prob = 0.5)
# Histogram
hist(normal_sample, main = "Normal Distribution Sample",
xlab = "Value", col = "lightblue", breaks = 20)import numpy as np
import matplotlib.pyplot as plt
# Set seed for reproducibility
np.random.seed(42)
# Normal distribution
normal_sample = np.random.normal(loc=50, scale=10, size=100)
print(f"Mean: {np.mean(normal_sample):.2f}")
print(f"SD: {np.std(normal_sample, ddof=1):.2f}")
# Uniform distribution
uniform_sample = np.random.uniform(low=0, high=100, size=100)
# Binomial distribution
binomial_sample = np.random.binomial(n=10, p=0.5, size=100)
# Histogram
plt.hist(normal_sample, bins=20, color='lightblue', edgecolor='black')
plt.title('Normal Distribution Sample')
plt.xlabel('Value')
plt.ylabel('Frequency')
plt.show()