Skip to content
FacebookTwitterLinkedinYouTubeGitHubSubscribeEmailRSS
Close
Beyond Knowledge Innovation

Beyond Knowledge Innovation

Where Data Unveils Possibilities

  • Home
  • AI & ML Insights
  • Machine Learning
    • Supervised Learning
      • Introduction
      • Regression
      • Classification
    • Unsupervised Learning
      • Introduction
      • Clustering
      • Association
      • Dimensionality Reduction
    • Reinforcement Learning
    • Generative AI
  • Knowledge Base
    • Introduction To Python
    • Introduction To Data
    • Introduction to EDA
  • References
HomeKnowledge BaseWhat is Uniform Distribution?
Knowledge Base Statistics

What is Uniform Distribution?

February 22, 2024February 22, 2024CEO 153 views
A uniform distribution is a probability distribution in which all outcomes or events are equally likely to occur. In other words, every possible outcome has the same probability of occurring.

  • Continuous Uniform Distribution: For a continuous uniform distribution over the interval [a, b], the probability density function (pdf) is constant within that interval and zero outside of it. The formula for the probability density function is:
\(f(x) = \frac{1}{b – a}\)
  • Discrete Uniform Distribution: For a discrete uniform distribution with (n) possible outcomes, each outcome has an equal probability of:
\(p = \frac{1}{n}\)

In Python, you can use the numpy library to generate random numbers following a uniform distribution. For example:

import numpy as np
import matplotlib.pyplot as plt

# Generate 1000 random numbers from a uniform distribution between 0 and 1
data = np.random.uniform(0, 1, 1000)

# Plot the histogram to visualize the uniform distribution
plt.hist(data, bins=50, edgecolor='black')
plt.title('Uniform Distribution')
plt.xlabel('Random Numbers')
plt.ylabel('Probability Density')
plt.show()
distribution, statistics, uniform

Post navigation

Previous Post
Previous post: What is Binomial Distribution?
Next Post
Next post: What is PolynomialFeatures preprocessing technique?

You Might Also Like

No image
What is Binomial Distribution?
February 21, 2024 Comments Off on What is Binomial Distribution?
No image
What is Gaussian Distribution?
February 9, 2024 Comments Off on What is Gaussian Distribution?
  • Recent
  • Popular
  • Random
  • No image
    7 months ago Low-Rank Factorization
  • No image
    7 months ago Perturbation Test for a Regression Model
  • No image
    7 months ago Calibration Curve for Classification Models
  • No image
    March 15, 20240Single linkage hierarchical clustering
  • No image
    April 17, 20240XGBoost (eXtreme Gradient Boosting)
  • No image
    April 17, 20240Gradient Boosting
  • No image
    May 5, 2024MNIST dataset in artificial neural network
  • No image
    May 9, 2024What is Deep Learning
  • No image
    January 16, 2024How to create a smaller dataset for…
  • Implementation (55)
    • EDA (4)
    • Neural Networks (10)
    • Supervised Learning (26)
      • Classification (17)
      • Linear Regression (8)
    • Unsupervised Learning (11)
      • Clustering (8)
      • Dimensionality Reduction (3)
  • Knowledge Base (44)
    • Python (27)
    • Statistics (6)
May 2025
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Oct    

We are on

FacebookTwitterLinkedinYouTubeGitHubSubscribeEmailRSS

Subscribe

© 2025 Beyond Knowledge Innovation
FacebookTwitterLinkedinYouTubeGitHubSubscribeEmailRSS