Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Python Tutorial
  • Interview Questions
  • Python Quiz
  • Python Glossary
  • Python Projects
  • Practice Python
  • Data Science With Python
  • Python Web Dev
  • DSA with Python
  • Python OOPs
Open In App
Next Article:
sympy.stats.Zeta() in Python
Next article icon

sympy.stats.Uniform() in Python

Last Updated : 08 Jun, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report

With the help of sympy.stats.Uniform() method, we can get the continuous random variable which represents the Uniform distribution.

Syntax : sympy.stats.Uniform(name, left, right)
Where, left and right are real number, -oo < left, left < right < +oo

Return : Return the continuous random variable.

Example #1 :
In this example we can see that by using sympy.stats.Uniform() method, we are able to get the continuous random variable representing Uniform distribution by using this method.




# Import sympy and Uniform
from sympy.stats import Uniform, density
from sympy import Symbol, pprint
  
z = Symbol("z")
a = Symbol("a", positive = True)
b = Symbol("b", positive = True)
  
# Using sympy.stats.Uniform() method
X = Uniform("x", a, b)
gfg = density(X)(z)
  
pprint(gfg)
 
 

Output :

/ 1
|—— for And(b >= z, a <= z)
<-a + b
|
\ 0 otherwise

Example #2 :




# Import sympy and Uniform
from sympy.stats import Uniform, density
from sympy import Symbol, pprint
  
z = 0.3
a = -3
b = 4
  
# Using sympy.stats.Uniform() method
X = Uniform("x", a, b)
gfg = density(X)(z)
  
pprint(gfg)
 
 

Output :

1/7



Next Article
sympy.stats.Zeta() in Python

J

Jitender_1998
Improve
Article Tags :
  • Python
  • Python SymPy-Stats
  • SymPy
Practice Tags :
  • python

Similar Reads

  • sympy.stats.UniformSum() in Python
    With the help of sympy.stats.UniformSum() method, we can get the continuous random variable which represents the irwin-hall distribution. Syntax : sympy.stats.UniformSum(name, n) Where, n is real number. Return : Return the continuous random variable. Example #1 : In this example we can see that by
    1 min read
  • sympy.stats.YuleSimon() in Python
    With the help of sympy.stats.YuleSimon() method, we can get the random variable representing the Yule-Simon distribution. Syntax : sympy.stats.YuleSimon(name, rho) Return : Return the random variable. Example #1 : In this example we can see that by using sympy.stats.YuleSimon() method, we are able t
    1 min read
  • sympy.stats.Zeta() in Python
    With the help of sympy.stats.Zeta() method, we can get the random variable representing the Zeta distribution. Syntax : sympy.stats.Zeta(name, s) Return : Return the random variable. Example #1 : In this example we can see that by using sympy.stats.Zeta() method, we are able to get the Zeta distribu
    1 min read
  • sympy.stats.Triangular() in Python
    With the help of sympy.stats.Triangular() method, we can get the continuous random variable which represents the triangular distribution. Syntax : sympy.stats.Triangular(name, a, b, c) Where, a, b and c are real number. Return : Return the continuous random variable. Example #1 : In this example we
    2 min read
  • sympy.stats.Chi() in Python
    With the help of sympy.stats.Chi() method, we can get the continuous random variable which represents the chi distribution. Syntax : sympy.stats.Chi(name, k) Where, k is number of degree of freedom. Return : Return the continuous random variable. Example #1 : In this example we can see that by using
    1 min read
  • sympy.stats.Coin() in Python
    With the help of sympy.stats.Coin() method, we can create a fair or unfair coin by using sympy.stats.Coin() method. A fair coin have the probability of Half but we can't tell for unfair coin. Syntax : sympy.stats.Coin(name, value) Parameters : Name - It stands for the name of the coin. Value - By de
    1 min read
  • sympy.stats.Beta() in Python
    With the help of sympy.stats.Beta() method, we can get the continuous random variable which represents the beta distribution. Syntax : sympy.stats.Beta(name, alpha, beta) Where, alpha and beta is greater than 0. Return : Return the continuous random variable. Example #1 : In this example we can see
    1 min read
  • sympy.stats.Levy() in python
    With the help of sympy.stats.Levy() method, we can get the continuous random variable which represents the levy distribution. Syntax : sympy.stats.Levy(name, mu, c) Where, mu and c are real number and mu, c > 0. Return : Return the continuous random variable. Example #1 : In this example we can s
    1 min read
  • sympy.stats.Dagum() in python
    With the help of sympy.stats.Dagum() method, we can get the continuous random variable representing the dagum distribution. Syntax : sympy.stats.Dagum(name, p, a, b) Where, p, a and b are real number greater than 0. Return : Return continuous random variable. Example #1 : In this example we can see
    1 min read
  • sympy.stats.Moyal() in python
    With the help of sympy.stats.Moyal() method, we can get the continuous random variable which represents the moyal distribution. Syntax : sympy.stats.Moyal(name, mu, sigma) Where, mu and sigma are real number. Return : Return the continuous random variable. Example #1 : In this example we can see tha
    1 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences