Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

In SciPy, use scipy.stats.expon for exponential waiting times. Its scale parameter is the mean waiting time, not the rate: if your model uses rate lambda, set scale=1/lambda. Then use cdf for the probability of an event occurring by a time, sf for the probability it occurs after that time, and rvs to generate values.

What SciPy’s exponential distribution models

SciPy describes scipy.stats.expon as “An exponential continuous random variable.” In its standard form, the distribution has density exp(-x) for x >= 0. It is commonly used to model nonnegative waiting times when the model assumes a constant event rate.

The standard distribution starts at zero. SciPy represents a shifted and scaled value using y = (x - loc) / scale; the default parameters are loc=0 and scale=1. The location shifts the support origin, while scale stretches or compresses the distribution. This location shift is not a separate “noncentral” exponential model. See the SciPy 1.16.0 expon API reference and the SciPy statistics tutorial.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Convert a rate to SciPy’s scale

Many probability texts parameterize an exponential distribution by rate lambda. SciPy’s expon uses scale instead, so enter the reciprocal: scale = 1 / lambda. In the zero-location model, scale is also the mean waiting time.

#1 Best Overall
Sale
TI-30XIIS Scientific Calculator Texas Instruments, Black
  • Fundamental, two-line calculator that combines statistics and advanced scientific functions for high school math and science
  • Two-line display shows the entry and calculated result at the same time for easy understanding of the calculation
  • Fraction features, conversions, and basic scientific and trigonometric functions
  • Solar and battery powered
  • Approved for use on SAT, ACT and AP exams

For example, a rate of 0.2 events per time unit corresponds to a mean wait of 5 time units. Set scale=5, not scale=0.2. Keep the units consistent: a rate per minute produces a scale in minutes.

from scipy.stats import expon

rate = 0.2  # events per time unit
rv = expon(scale=1 / rate)  # mean waiting time: 5 time units

Pass parameters by keyword to make the intended meaning clear. For a zero-origin exponential with mean 3, use expon(scale=3). The official SciPy statistics tutorial recommends explicit loc and scale keywords.

Rank #2
Sale
Texas Instruments TI-30XS MultiView Scientific Calculator
  • View multiple calculations at the same time: Compare results and explore patterns on-screen with the MultiView display that supports up to four lines
  • See math exactly as it appears in textbooks: Display math expressions, symbols and stacked fractions exactly the way they appear in textbooks — no need to adapt to a technical syntax; provides quick access to frequently used functions
  • Scientific notation output: View scientific notation with the proper superscripted exponents and see the output in scientific notation
  • Explore (x,y) table of values: Students can easily explore an (x,y) table of values for a given function automatically or by entering specific x values
  • The TI-30XS MultiView scientific calculator is ideal for general math, Pre-Algebra, Algebra 1 and 2, Geometry, Statistics, general science, Biology and Chemistry

Calculate probabilities and generate samples

Import expon from scipy.stats. You can call its methods directly or freeze parameters in a distribution object, as in rv below. With rate 0.2 per time unit, the following computes the chance of an event within five time units, the chance of waiting longer than five, and a reproducible array of 1,000 generated waiting times.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
from scipy.stats import expon

rate = 0.2
rv = expon(scale=1 / rate)

prob_within_5 = rv.cdf(5)
prob_after_5 = rv.sf(5)
samples = rv.rvs(size=1000, random_state=42)

Use cdf(x) for the probability that a value is at or below x, and sf(x) for the probability it is above x. For an upper-tail probability, prefer sf(x) to writing 1 - cdf(x): SciPy notes that the survival function can be more accurate in some cases.

Rank #3
Sale
Texas Instruments TI-30Xa Scientific Calculator
  • 10-digit display; for general math, pre-algebra, algebra 1 and 2, trigonometry and biology
  • Performs trigonometric functions, logarithms, roots, powers, reciprocals, and factorials
  • Also add, subtract, multiply and divide fractions; 1-variable statistics (mean / standard deviation)
  • Conversions: fractions/decimals, degrees/radians/grads, DMS/decimal/degrees, and polar/rectangular
  • Battery-powered; includes slide case

Choose the method that matches the question

Question Method What it returns
What is the density at a value? pdf(x) Probability density, not the probability of one exact continuous value
What is the log density? logpdf(x) Natural logarithm of the probability density
What is the probability of a value at or below a threshold? cdf(x) Cumulative probability
What is the probability of a value above a threshold? sf(x) Survival, or upper-tail, probability
What is the log cumulative or log upper-tail probability? logcdf(x) or logsf(x) Logarithm of the corresponding tail probability
What value marks a cumulative probability? ppf(q) Quantile for cumulative probability q
What value marks an upper-tail probability? isf(q) Inverse survival quantile for upper-tail probability q
How can I draw random values? rvs(size=..., random_state=...) Random variates
How can I inspect moments or support? stats(...) or support() Distribution statistics or support bounds

For example, rv.ppf(0.95) gives the 95th percentile, while rv.isf(0.05) gives the threshold with 5% of the distribution above it. These are equivalent quantile questions expressed from opposite tails.

Use a shifted origin only when the model requires it

Set loc when the distribution should begin at a value other than zero. For instance, expon(loc=10, scale=3) shifts the support to start at 10 while retaining scale 3. A location shift changes the origin; it does not change scale into a rate or produce a different named distribution. The default support begins at loc.

Rank #4
CATIGA Scientific Calculators with Graphic Functions, Graphing Calculators with Multiple Modes, Scientific Calculators for Students, High School or College Courses, Calculadora Cientifica, CS-229
  • Scientific Calculator with Graphic Function: All-in-one scientific and graphing calculator. Supports plotting functions, analyzing graphs, and solving complex equations. Displays graphs and formulas simultaneously for clear visualization. Ideal for algebra, calculus, and exam prep.
  • Compact and Comfortable Design: This scientific and graphing calculator sized at 7 x 3.3 inches for a balanced and ergonomic feel. Fits easily in one hand or on a desk without taking up space. Ideal for long study sessions, test environments, and everyday academic or professional use; smooth button layout supports efficient input and navigation.
  • Multiple Modes and 360+ Functions: Includes angle measurement, calculation, and display modes for flexible use across subjects. This scientific and graphing calculator supports over 360 functions such as fractions, complex numbers, statistics, linear regression, standard deviation, and variable solving. Ideal for mastering algebra, geometry, trigonometry, and advanced math applications.
  • Durable and Portable Design: Built with an anti-drop body that resists everyday impacts for long-term use. This scientific and graphing calculator is lightweight and slim for easy carrying in a backpack or pocket that includes a protective case to guard the screen and buttons during travel or storage.
  • If you cannot turn on the calculator, please press the reset button on the back! If you have any further problems, we offer a limited warranty of 365 days. Please contact us and we will give you an answer within 24 hours.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Distinguish related SciPy distributions

expon is the exponential distribution and is a special case of the gamma distribution with shape a=1. Do not confuse it with exponnorm, SciPy’s exponentially modified normal distribution, which is a different model. The definitions and methods for expon are in the versioned SciPy API reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

SaleBestseller No. 1
TI-30XIIS Scientific Calculator Texas Instruments, Black
TI-30XIIS Scientific Calculator Texas Instruments, Black
Fraction features, conversions, and basic scientific and trigonometric functions; Solar and battery powered
$13.88
SaleBestseller No. 3
Texas Instruments TI-30Xa Scientific Calculator
Texas Instruments TI-30Xa Scientific Calculator
10-digit display; for general math, pre-algebra, algebra 1 and 2, trigonometry and biology
$10.98
Best Value
Casio FX-300ESPLSB-WAIT Scientific Calculator
  • Natural Textbook Display presents formulas and results exactly as written in textbooks for intuitive learning.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.