NProbability
✖
NProbability
gives the numerical probability for an event that satisfies the predicate pred under the assumption that x follows the probability distribution dist.
gives the numerical probability that an event satisfies pred under the assumption that {x1,x2,…} follows the multivariate distribution dist.
gives the numerical probability that an event satisfies pred under the assumption that x1, x2, … are independent and follow the distributions dist1, dist2, ….
Details and Options

- xdist can be entered as x
dist
dist or x \[Distributed]dist.
- pred1pred2 can be entered as pred1
cond
pred2 or pred1 \[Conditioned]pred2.
- NProbability works like Probability except numerical summation and integration methods are used.
- For a continuous distribution dist, the probability of pred is given by ∫Boole[pred]f[x]x where f[x] is the probability density function of dist and the integral is taken over the domain of dist.
- For a discrete distribution dist, the probability of pred is given by ∑Boole[pred]f[x] where f[x] is the probability density function of dist and the summation is taken over the domain of dist.
- NProbability[pred,{x1dist1,x2dist2}] corresponds to NExpectation[NProbability[pred,x2dist2],x1dist1] so that the last variable is summed or integrated first.
- N[Probability[…]] calls NProbability for probabilities that cannot be done symbolically.
- The following options can be given:
-
AccuracyGoal ∞ digits of absolute accuracy sought PrecisionGoal Automatic digits of precision sought WorkingPrecision MachinePrecision the precision used in internal computations Method Automatic what method to use
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Compute the probability of a simple event:

https://wolfram.com/xid/05f0ujfhey-houj6b


https://wolfram.com/xid/05f0ujfhey-bothj9


https://wolfram.com/xid/05f0ujfhey-kavjri


https://wolfram.com/xid/05f0ujfhey-cl2gyl

Compute the probability of a nonlinear and logical combination of inequalities:

https://wolfram.com/xid/05f0ujfhey-csl8ts


https://wolfram.com/xid/05f0ujfhey-bnr8lo


https://wolfram.com/xid/05f0ujfhey-dlm0pt


https://wolfram.com/xid/05f0ujfhey-by8ij0

Compute a conditional probability:

https://wolfram.com/xid/05f0ujfhey-k7ilu5


https://wolfram.com/xid/05f0ujfhey-ffc4yk

Scope (27)Survey of the scope of standard use cases
Basic Uses (9)
Compute the probability of an event in a continuous univariate distribution:

https://wolfram.com/xid/05f0ujfhey-d8ij3j

Discrete univariate distribution:

https://wolfram.com/xid/05f0ujfhey-da6f8w

Continuous multivariate distribution:

https://wolfram.com/xid/05f0ujfhey-h96mjl

Discrete multivariate distribution:

https://wolfram.com/xid/05f0ujfhey-iwwimq

Compute the probability using independently distributed random variables:

https://wolfram.com/xid/05f0ujfhey-ck24zj

Find the conditional probability with general nonzero probability conditioning:

https://wolfram.com/xid/05f0ujfhey-jamqej

Discrete univariate distribution:

https://wolfram.com/xid/05f0ujfhey-9oq16

Multivariate continuous distribution:

https://wolfram.com/xid/05f0ujfhey-bhk6y5

Multivariate discrete distribution:

https://wolfram.com/xid/05f0ujfhey-iiz3ha

Compute the conditional probability with a zero-probability conditioning event:

https://wolfram.com/xid/05f0ujfhey-g5cok

Apply N[Probability[…]] to invoke NProbability if symbolic evaluation fails:

https://wolfram.com/xid/05f0ujfhey-t0gc2

https://wolfram.com/xid/05f0ujfhey-bet61z


https://wolfram.com/xid/05f0ujfhey-cjb03c


https://wolfram.com/xid/05f0ujfhey-bu1mdl

Use nonlinear predicates and arbitrary logical combinations:

https://wolfram.com/xid/05f0ujfhey-kdvjv

Multivariate nonlinear predicates:

https://wolfram.com/xid/05f0ujfhey-b7d5tt

Visualize the region of the event:

https://wolfram.com/xid/05f0ujfhey-m0bpr3

Obtain results with different precisions:

https://wolfram.com/xid/05f0ujfhey-ciyyyh


https://wolfram.com/xid/05f0ujfhey-fnqvz2


https://wolfram.com/xid/05f0ujfhey-bca0sn


https://wolfram.com/xid/05f0ujfhey-b7kucy


https://wolfram.com/xid/05f0ujfhey-dqfi5m


https://wolfram.com/xid/05f0ujfhey-kcjk0


https://wolfram.com/xid/05f0ujfhey-esd50h

Probability of an event for a time slice of a Poisson process:

https://wolfram.com/xid/05f0ujfhey-mja9ix

Find the probability of an event when a distribution is specified by a list:

https://wolfram.com/xid/05f0ujfhey-j3n654

https://wolfram.com/xid/05f0ujfhey-evjfaa

Quantity Uses (3)
Probability of events specified using Quantity:

https://wolfram.com/xid/05f0ujfhey-dt8gxo

Probability involving QuantityDistribution:

https://wolfram.com/xid/05f0ujfhey-1hybka

Conditional probability specified using Quantity:

https://wolfram.com/xid/05f0ujfhey-lsz626

Parametric Distributions (4)
Compute probabilities for univariate continuous distributions:

https://wolfram.com/xid/05f0ujfhey-dq1irb


https://wolfram.com/xid/05f0ujfhey-sy700


https://wolfram.com/xid/05f0ujfhey-b0s1e6


https://wolfram.com/xid/05f0ujfhey-k71279

Compute probabilities for univariate discrete distributions:

https://wolfram.com/xid/05f0ujfhey-co8n41


https://wolfram.com/xid/05f0ujfhey-cc88jq


https://wolfram.com/xid/05f0ujfhey-dvyhpp


https://wolfram.com/xid/05f0ujfhey-4fb80

Probabilities for multivariate continuous distributions:

https://wolfram.com/xid/05f0ujfhey-fbsigp


https://wolfram.com/xid/05f0ujfhey-cemgjz


https://wolfram.com/xid/05f0ujfhey-cz594v

Probabilities for multivariate discrete distributions:

https://wolfram.com/xid/05f0ujfhey-g833t0


https://wolfram.com/xid/05f0ujfhey-dx83bv


https://wolfram.com/xid/05f0ujfhey-b2t61u

Nonparametric Distributions (2)
Using a univariate HistogramDistribution:

https://wolfram.com/xid/05f0ujfhey-kfcmmb

https://wolfram.com/xid/05f0ujfhey-6hyey

A multivariate histogram distribution:

https://wolfram.com/xid/05f0ujfhey-bfrdge

https://wolfram.com/xid/05f0ujfhey-kaahos

Using a univariate KernelMixtureDistribution:

https://wolfram.com/xid/05f0ujfhey-cfp9dj

https://wolfram.com/xid/05f0ujfhey-c6dg7b

Derived Distributions (9)
Compute the probability using a TransformedDistribution:

https://wolfram.com/xid/05f0ujfhey-iag1vr

An equivalent way of formulating the same probability:

https://wolfram.com/xid/05f0ujfhey-bbzcql

Find the probability using a ProductDistribution:

https://wolfram.com/xid/05f0ujfhey-gdjg

An equivalent formulation for the same probability:

https://wolfram.com/xid/05f0ujfhey-bf0feu

Using a component mixture of normal distributions:

https://wolfram.com/xid/05f0ujfhey-d7u00

Parameter mixture of exponential distributions:

https://wolfram.com/xid/05f0ujfhey-ecfaaj

Truncated Dirichlet distribution:

https://wolfram.com/xid/05f0ujfhey-digppw

Censored triangular distribution:

https://wolfram.com/xid/05f0ujfhey-wko7c


https://wolfram.com/xid/05f0ujfhey-b7zw3w

An equivalent way of formulating the same probability:

https://wolfram.com/xid/05f0ujfhey-h7628


https://wolfram.com/xid/05f0ujfhey-n8sal1


https://wolfram.com/xid/05f0ujfhey-cyug61

Generalizations & Extensions (2)Generalized and extended use cases
Options (6)Common values & functionality for each option
AccuracyGoal (1)
Obtain a result with the default setting for accuracy:

https://wolfram.com/xid/05f0ujfhey-c2zgyo

Use AccuracyGoal to obtain the result with a different accuracy:

https://wolfram.com/xid/05f0ujfhey-c875wk

Method (3)
Use the Method option to increase the number of recursive bisections for numerical integration:

https://wolfram.com/xid/05f0ujfhey-e6p35i

https://wolfram.com/xid/05f0ujfhey-yekty

Compare with the exact result from Probability:

https://wolfram.com/xid/05f0ujfhey-eh32rv


https://wolfram.com/xid/05f0ujfhey-gf0p4u

Calculate the probability of an event:

https://wolfram.com/xid/05f0ujfhey-e4g374

Obtain an estimate based on simulation:

https://wolfram.com/xid/05f0ujfhey-hn4bdv


https://wolfram.com/xid/05f0ujfhey-ouokld

Compute the probability of an event for a continuous distribution:

https://wolfram.com/xid/05f0ujfhey-e2spa8

This example uses NIntegrate:

https://wolfram.com/xid/05f0ujfhey-lhtez

Use Activate to evaluate the result:

https://wolfram.com/xid/05f0ujfhey-d3z8ie

PrecisionGoal (1)
Obtain a result with the default setting for precision:

https://wolfram.com/xid/05f0ujfhey-447ct

Use PrecisionGoal to obtain the result with a different precision:

https://wolfram.com/xid/05f0ujfhey-cbv97a

WorkingPrecision (1)
By default, NProbability uses machine precision:

https://wolfram.com/xid/05f0ujfhey-bgomwb

Use WorkingPrecision to obtain results with higher precision:

https://wolfram.com/xid/05f0ujfhey-dcbv84

Applications (26)Sample problems that can be solved with this function
Random Experiments (5)
A coin-tossing experiment consists of tossing a fair coin repeatedly until a head results. Simulate the process:

https://wolfram.com/xid/05f0ujfhey-la4qj


https://wolfram.com/xid/05f0ujfhey-fiimqb

Compute the probability that at least 5 coin tosses will be necessary:

https://wolfram.com/xid/05f0ujfhey-gxl7s

Compute the expected number of coin tosses:

https://wolfram.com/xid/05f0ujfhey-dudozh

The number of heads in flips with a fair coin can be modeled with BinomialDistribution:

https://wolfram.com/xid/05f0ujfhey-jw2y3d
Show the distribution of heads for 100 coin flips:

https://wolfram.com/xid/05f0ujfhey-ef2bxy

Compute the probability that there are between 60 and 80 heads in 100 coin flips:

https://wolfram.com/xid/05f0ujfhey-bb9xls

Now, suppose that for an unfair coin the probability of heads is 0.6:

https://wolfram.com/xid/05f0ujfhey-m8j3if
The distribution and the corresponding probabilities have changed:

https://wolfram.com/xid/05f0ujfhey-dm4ue0


https://wolfram.com/xid/05f0ujfhey-c7hc0

A fair six-sided die can be modeled using a DiscreteUniformDistribution:

https://wolfram.com/xid/05f0ujfhey-1pli3

https://wolfram.com/xid/05f0ujfhey-fth69w

Compute the probability that the sum of three dice values is less than 6:

https://wolfram.com/xid/05f0ujfhey-egjijb

Verify by generating random dice throws, in this case dice throws:

https://wolfram.com/xid/05f0ujfhey-gine4


https://wolfram.com/xid/05f0ujfhey-nkj462

Verify by explicitly enumerating all possible dice outcomes:

https://wolfram.com/xid/05f0ujfhey-hrhl2h


https://wolfram.com/xid/05f0ujfhey-cza433

The number of tails before getting 4 heads with a fair coin:

https://wolfram.com/xid/05f0ujfhey-miygwo
Plot the distribution of tail counts:

https://wolfram.com/xid/05f0ujfhey-g9955g

Compute the probability of getting at least 6 tails before getting 4 heads:

https://wolfram.com/xid/05f0ujfhey-c8oprl

Compute the expected number of tails before getting 4 heads:

https://wolfram.com/xid/05f0ujfhey-cxsbua

Suppose an urn has 100 elements, of which 40 are special:

https://wolfram.com/xid/05f0ujfhey-bn8qqm
The probability distribution that there are 20 special elements in a draw of 50 elements:

https://wolfram.com/xid/05f0ujfhey-g84te0

Compute the probability that there are more than 25 special elements in a draw of 50 elements:

https://wolfram.com/xid/05f0ujfhey-co1uhl

Compute the expected number of special elements in a draw of 50 elements:

https://wolfram.com/xid/05f0ujfhey-fcuqcg

Sports and Games (3)
Gary Kasparov, chess champion, plays in a tournament simultaneously against 100 amateurs. It has been estimated that he loses about 1% of such games. Find the probability of his losing 0, 2, 5, and 10 games:

https://wolfram.com/xid/05f0ujfhey-g8ncpz

Use a Poisson approximation to compute the same probabilities:

https://wolfram.com/xid/05f0ujfhey-b81y3g

Perform the same computation when he is playing 5 games, but with stronger opposition so that his loss probability is 10% instead:

https://wolfram.com/xid/05f0ujfhey-3mfrk

In this case the Poisson approximation is less accurate:

https://wolfram.com/xid/05f0ujfhey-k9nefc

A basketball player has a free-throw percentage of 0.75. Simulate 10 free throws:

https://wolfram.com/xid/05f0ujfhey-igw9l2

Find the probability that the player hits 2 out of 3 free throws in a game:

https://wolfram.com/xid/05f0ujfhey-lfpnb

Find the distribution of the number of spades in a five-card poker hand:

https://wolfram.com/xid/05f0ujfhey-chzep5


https://wolfram.com/xid/05f0ujfhey-hexglq

Find the probability that there are at least 2 spades in the poker hand:

https://wolfram.com/xid/05f0ujfhey-worqp

Weather (3)
Logistic distribution can be used to approximate wind speeds:

https://wolfram.com/xid/05f0ujfhey-jg21ew
Find the estimated distribution:

https://wolfram.com/xid/05f0ujfhey-cnbigz

Compare the PDF to the histogram of the wind data:

https://wolfram.com/xid/05f0ujfhey-dpdc5t

Find the probability of a day with wind speed greater than 30 km/h:

https://wolfram.com/xid/05f0ujfhey-umawv


https://wolfram.com/xid/05f0ujfhey-l2olgi

Simulate wind speeds for a month:

https://wolfram.com/xid/05f0ujfhey-dj0c96

Cloud duration approximately follows a beta distribution with parameters 0.3 and 0.4 for a particular location. Find the probability that cloud duration will be longer than half a day:

https://wolfram.com/xid/05f0ujfhey-cmtwjz

Simulate the fraction of the day that is cloudy over a period of one month:

https://wolfram.com/xid/05f0ujfhey-cbfkm0

https://wolfram.com/xid/05f0ujfhey-dduelh

Find the average cloudiness duration for a day:

https://wolfram.com/xid/05f0ujfhey-cxfjtn

Find the probability of having exactly 20 days in a month with cloud duration less than 10%:

https://wolfram.com/xid/05f0ujfhey-b59uk


https://wolfram.com/xid/05f0ujfhey-e69lcj

Find the probability of at least 20 days in a month with cloud duration less than 10%:

https://wolfram.com/xid/05f0ujfhey-b0hyuu

The expected number of raindrops falling into a bucket in a 5-second interval is 20. Simulate the raindrop count for each 5-second interval:

https://wolfram.com/xid/05f0ujfhey-m4yg8r


https://wolfram.com/xid/05f0ujfhey-b8gnn3

Find the probability that more than 20 raindrops fall into the bucket in 5 seconds:

https://wolfram.com/xid/05f0ujfhey-kb0mm9

Traffic (2)
Two trains arrive at a station independently and stay for 10 minutes. If the arrival times are uniformly distributed, find the probability the two trains will meet at the station within one hour:

https://wolfram.com/xid/05f0ujfhey-fmanb

The region where the two trains meet:

https://wolfram.com/xid/05f0ujfhey-eh4pmx

A person is standing by a road counting cars until he sees a black one, at which point he restarts the count. Simulate the counting process, assuming that 10% of the cars are black:

https://wolfram.com/xid/05f0ujfhey-j86dgs


https://wolfram.com/xid/05f0ujfhey-btz94a

Find the expected number of cars to come by before the count starts over:

https://wolfram.com/xid/05f0ujfhey-bz1knm

Find the probability of counting 10 or more cars before a black one:

https://wolfram.com/xid/05f0ujfhey-4m5a

Actuarial Science (4)
A group insurance policy covers the medical claims of the employees of a small company. The value of the claims made in one year is described by
, where
is a random variable with density function proportional to
for
. Find the conditional probability that
exceeds 40000, given that
exceeds 10000:

https://wolfram.com/xid/05f0ujfhey-eap10y


https://wolfram.com/xid/05f0ujfhey-lgmqv5

https://wolfram.com/xid/05f0ujfhey-i9709

The waiting time for the first claim from a good driver and the waiting time for the first claim from a bad driver are independent and follow exponential distributions with means 6 years and 3 years, respectively. Compute the probability that the first claim from a good driver will be filed within 3 years and the first claim from a bad driver will be filed within 2 years:

https://wolfram.com/xid/05f0ujfhey-drh2tb

Two insurers provide bids on an insurance policy to a large company. The bids must be between 2000 and 2200. The company decides to accept the lower bid if the two bids differ by 20 or more. Otherwise, the company will consider the two bids further. Assume that the two bids are independent and are both uniformly distributed on the interval from 2000 to 2200. Determine the probability that the company considers the two bids further:

https://wolfram.com/xid/05f0ujfhey-cjyuih

Claims filed under auto insurance policies follow a normal distribution with mean 19400 and standard deviation 5000. Find the probability that the average of 25 randomly selected claims exceeds 20000:

https://wolfram.com/xid/05f0ujfhey-bo0kk6

https://wolfram.com/xid/05f0ujfhey-f4bnhp

Reliability (3)
A battery has a lifetime that is approximately normally distributed with a mean of 1000 hours and a standard deviation of 50 hours. Find the fraction with a lifetime between 800 and 1000 hours:

https://wolfram.com/xid/05f0ujfhey-ivi7p9

Out of 100 batteries, compute how many have a lifetime between 800 and 1000 hours:

https://wolfram.com/xid/05f0ujfhey-itdth8

A system is composed of 4 independent components, each with lifespan exponentially distributed with parameter . Find the probability that no component fails before 500 hours:

https://wolfram.com/xid/05f0ujfhey-bmnbp9

Directly use SurvivalFunction:

https://wolfram.com/xid/05f0ujfhey-zbpi3

Find the probability that exactly one component will fail in the first 1200 hours:

https://wolfram.com/xid/05f0ujfhey-ldxaha

Directly use CDF and SurvivalFunction:

https://wolfram.com/xid/05f0ujfhey-b7j0i

By using BooleanCountingFunction you can also define the logical condition:

https://wolfram.com/xid/05f0ujfhey-h9o0n

https://wolfram.com/xid/05f0ujfhey-fwlh0x


https://wolfram.com/xid/05f0ujfhey-iqmprz

A budget-priced lighter has 0.90 probability of lighting on any given attempt. Simulate the lighting process; the result indicates the number of failures before successful lighting:

https://wolfram.com/xid/05f0ujfhey-hdtfgu

Find the probability that the lighter lights in 3 trials or less:

https://wolfram.com/xid/05f0ujfhey-bexk42

Other Applications (6)
A radioactive material on average emits 3.2 -particles per second; show the distribution:

https://wolfram.com/xid/05f0ujfhey-bndkt3

Compute the probability that more than 4 -particles are emitted over the next second:

https://wolfram.com/xid/05f0ujfhey-jd345d

Simulate a typical particle count per second over 10 minutes:

https://wolfram.com/xid/05f0ujfhey-c28dky

A company manufactures nails with length normally distributed, mean 0.497 inches, and standard deviation 0.002 inches. Find the fraction that satisfies the specification of length equal to 0.5 inches plus/minus 0.004 inches:

https://wolfram.com/xid/05f0ujfhey-iwbspa

Assume the waiting time a customer spends in a restaurant is exponentially distributed with an average wait time of 5 minutes. Find the probability that the customer will have to wait more than 10 minutes:

https://wolfram.com/xid/05f0ujfhey-droit2

Find the probability that the customer will have to wait an additional 10 minutes, given that he or she has already been waiting for at least 10 minutes (the past does not matter):

https://wolfram.com/xid/05f0ujfhey-b5d4qn

A drug has proven to be effective in 30% of cases. Find the probability it is effective in 3 of 4 patients:

https://wolfram.com/xid/05f0ujfhey-dewx4y

Suppose there are 5 defective items in a batch of 10 items, and 6 items are selected for testing. Simulate the process of testing when the number of defective items found is counted:

https://wolfram.com/xid/05f0ujfhey-cul2g


https://wolfram.com/xid/05f0ujfhey-bvbxmf

Find the probability that there are 2 defective items in the sample:

https://wolfram.com/xid/05f0ujfhey-ch8ayu

Assume that the duration of telephone calls is exponentially distributed. The average length of a telephone call is 3.7 minutes. Find the probability that 9 consecutive phone calls will be longer than 25 minutes:

https://wolfram.com/xid/05f0ujfhey-mr1yqb


https://wolfram.com/xid/05f0ujfhey-d2lp8w

Summing 9 independent phone call durations:

https://wolfram.com/xid/05f0ujfhey-b3kgg0

The probability that they last longer than 25 minutes:

https://wolfram.com/xid/05f0ujfhey-c92hfe

Properties & Relations (11)Properties of the function, and connections to other functions
The probability of an event in a continuous distribution is defined by an integral:

https://wolfram.com/xid/05f0ujfhey-js67d


https://wolfram.com/xid/05f0ujfhey-bv62be

The probability of an event in a discrete distribution is defined by a sum:

https://wolfram.com/xid/05f0ujfhey-b1i8wz


https://wolfram.com/xid/05f0ujfhey-kz9qwe

The CDF and SurvivalFunction of a distribution can be expressed as probabilities:

https://wolfram.com/xid/05f0ujfhey-t2sbv

https://wolfram.com/xid/05f0ujfhey-fm8ipm


https://wolfram.com/xid/05f0ujfhey-ko4hp

The survival function for a distribution can be expressed as a probability:

https://wolfram.com/xid/05f0ujfhey-rehnqo

https://wolfram.com/xid/05f0ujfhey-chhphb

The hazard function for a distribution can be expressed as a probability:

https://wolfram.com/xid/05f0ujfhey-mzhq43

https://wolfram.com/xid/05f0ujfhey-e6nio

The probability of an impossible event is 0:

https://wolfram.com/xid/05f0ujfhey-bln60r

The probability of a certain event is 1:

https://wolfram.com/xid/05f0ujfhey-d93hpm

The probability of an arbitrary event must lie between 0 and 1:

https://wolfram.com/xid/05f0ujfhey-f62wgz

Use Probability to find a symbolic expression for the probability of an event:

https://wolfram.com/xid/05f0ujfhey-b33zae

https://wolfram.com/xid/05f0ujfhey-eenbh1


https://wolfram.com/xid/05f0ujfhey-pkobp5


https://wolfram.com/xid/05f0ujfhey-bzmcmw

N[Probability[…]] is equivalent to NProbability if symbolic evaluation fails:

https://wolfram.com/xid/05f0ujfhey-ef8yf1

https://wolfram.com/xid/05f0ujfhey-epm0j1


https://wolfram.com/xid/05f0ujfhey-cezvyb


https://wolfram.com/xid/05f0ujfhey-db3rgk

A conditional probability is defined by a ratio of probabilities:

https://wolfram.com/xid/05f0ujfhey-czq87o

https://wolfram.com/xid/05f0ujfhey-bh1j2x

https://wolfram.com/xid/05f0ujfhey-be680p


https://wolfram.com/xid/05f0ujfhey-iq1hq2

The probability of independent events is the sum of the individual probabilities:

https://wolfram.com/xid/05f0ujfhey-j3lc2

https://wolfram.com/xid/05f0ujfhey-f7w5wy

https://wolfram.com/xid/05f0ujfhey-d0x85m


https://wolfram.com/xid/05f0ujfhey-hnd1dn

For dependent events one needs to subtract the probability of an intersection event:

https://wolfram.com/xid/05f0ujfhey-bs0a7f

https://wolfram.com/xid/05f0ujfhey-fpkbny

https://wolfram.com/xid/05f0ujfhey-syr6o


https://wolfram.com/xid/05f0ujfhey-o8ywos

Compute the probability of an event:

https://wolfram.com/xid/05f0ujfhey-m8g5dj

Obtain the same result using NExpectation:

https://wolfram.com/xid/05f0ujfhey-efo8y8

Possible Issues (1)Common pitfalls and unexpected behavior
NProbability may fail without a warning message in the presence of symbolic parameters:

https://wolfram.com/xid/05f0ujfhey-lyjhp

Probability gives a closed-form result in this example:

https://wolfram.com/xid/05f0ujfhey-cuwaqz

Wolfram Research (2010), NProbability, Wolfram Language function, https://reference.wolfram.com/language/ref/NProbability.html.
Text
Wolfram Research (2010), NProbability, Wolfram Language function, https://reference.wolfram.com/language/ref/NProbability.html.
Wolfram Research (2010), NProbability, Wolfram Language function, https://reference.wolfram.com/language/ref/NProbability.html.
CMS
Wolfram Language. 2010. "NProbability." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NProbability.html.
Wolfram Language. 2010. "NProbability." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NProbability.html.
APA
Wolfram Language. (2010). NProbability. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NProbability.html
Wolfram Language. (2010). NProbability. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NProbability.html
BibTeX
@misc{reference.wolfram_2025_nprobability, author="Wolfram Research", title="{NProbability}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/NProbability.html}", note=[Accessed: 19-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_nprobability, organization={Wolfram Research}, title={NProbability}, year={2010}, url={https://reference.wolfram.com/language/ref/NProbability.html}, note=[Accessed: 19-June-2025
]}