Skip to content

Distributed ​

Binds a variable to a distribution, for Expectation and Probability.

Distributed(x, dist)an inert binding — x follows dist. Stays itself under evaluation; only Expectation/Probability read it.
Typed signatures
TypePackageApplies
(any, any) -> expression<Distributed>statisticsalways

Domain: Statistics

Details
  • Wolfram's own infix x \[Distributed] dist parses to exactly this call. Only the second argument of Expectation/Probability is read as a Distributed binding — elsewhere it is just an inert expression.
  • The first argument is read structurally (it must be a symbol) rather than type-checked — compute-engine PINS a parameter typed literally symbol onto that symbol's inferred type globally, breaking later unrelated uses of the same name (confirmed empirically); typing it any here avoids that.

Examples

Basic #
live ↗
InDistributed(x,NormalDistribution⁡(0,1))\mathrm{Distributed}(x, \operatorname{NormalDistribution}(0, 1))OutDistributed(x,NormalDistribution⁡(0,1))\mathrm{Distributed}(x, \operatorname{NormalDistribution}(0, 1))
Scope #

Read by Expectation — see there for the general behavior

live ↗
InExpectation(x,Distributed(x,NormalDistribution⁡(2,3)))\mathrm{Expectation}(x, \mathrm{Distributed}(x, \operatorname{NormalDistribution}(2, 3)))Out22
About
Examples2

See also: Expectation, Probability