Tutorials › Statistical Theory I - Probability and Distribution Theory › Spike-And-Slab Probability Laws

Discrete, Continuous, and Mixed Laws · Tutorial 63 of 994

Spike-And-Slab Probability Laws

Learn to calculate probabilities under a law that combines a point mass at a designated value with a continuous slab.

Beginner 9 min read

What You'll Learn

  • Define a spike-and-slab law using its spike weight and slab density
  • Derive the CDF on either side of the designated spike value
  • Find point probabilities and identify the CDF jump at the spike
  • Calculate interval and set probabilities when the spike is included or excluded
  • Distinguish the probability mass at the spike from the slab density there

What Makes a Law Spike-and-Slab?

A probability law can assign positive probability to one exact value while spreading its remaining probability continuously over a range of values. The exact value is the spike; the continuous part is the slab. These laws are useful when a particular outcome, such as an exact zero, is possible for a distinct reason, while other outcomes vary across a continuum.

The key calculation is to keep the two contributions separate. A set containing the spike receives its point mass as well as any probability contributed by the slab. A set that excludes the spike receives only its slab probability. The same distinction determines the CDF on either side of the spike.

Definition: Let \(c\) be a designated real value, let \(0<p<1\), and let \(g\) be a probability density on the real line, so \(g(x)\geq 0\) and \(\int_{-\infty}^{\infty}g(x)\,dx=1\). A spike-and-slab law with spike value \(c\), spike weight \(p\), and slab density \(g\) assigns each Borel set \(A\) probability $$ P(X\in A)=p\,\mathbf{1}_{\{c\in A\}}+(1-p)\int_A g(x)\,dx. $$ Here \(\mathbf{1}_{\{c\in A\}}\) is 1 if \(c\in A\) and 0 otherwise. The slab’s probability contribution has total weight \(1-p\); its density as part of the full law is therefore \((1-p)g\).

The density \(g\) is normalized as a probability density on its own. The factor \(1-p\) scales its contribution to the full law. Since a density assigns probability zero to every single point, the slab contributes no point mass at \(c\), even when \(g(c)>0\). Thus \(P(X=c)=p\). The definition requires \(g\) to integrate to one; if \(p=0\) or \(p=1\), the formula still defines the limiting cases of a purely continuous law or a point mass.

Deriving the CDF

Let \(G(x)=\int_{-\infty}^{x}g(t)\,dt\) be the CDF of the slab. The event defining the CDF is \(\{X\leq x\}\). It contains the spike exactly when \(c\leq x\), so its probability has a slab contribution and, when appropriate, a spike contribution.

Theorem: The CDF of a spike-and-slab law is $$ F(x)=(1-p)G(x)+p\,\mathbf{1}_{\{x\geq c\}}. $$ Equivalently, \(F(x)=(1-p)G(x)\) for \(x<c\), and \(F(x)=p+(1-p)G(x)\) for \(x\geq c\).

To derive the formula, apply the law’s definition to the Borel set \((-\infty,x]\). The indicator of \(c\in(-\infty,x]\) equals \(\mathbf{1}_{\{x\geq c\}}\), while the slab integral over that set is \(G(x)\). Adding those terms gives the stated CDF. At \(x=c\), the indicator is already 1: the CDF includes the entire spike at its location.

Every density CDF \(G\) is continuous. Therefore the left-hand limit of \(F\) at \(c\) is \((1-p)G(c)\), while \(F(c)=p+(1-p)G(c)\). Their difference is \(p\). The jump in the CDF records the probability of the spike, not a feature of the density’s height.

Point and Interval Probabilities

For a single value \(t\), the slab integral over \(\{t\}\) is zero because a singleton has length zero. The set formula therefore gives $$ P(X=t)=p\,\mathbf{1}_{\{t=c\}}. $$ In particular, the only atom is at \(c\), and its probability is \(p\). For an interval, add the spike weight if and only if the interval contains \(c\); then add the slab probability over the interval.

Theorem: For any real numbers \(a<b\), $$ P(a<X\leq b)=(1-p)\int_a^b g(x)\,dx+p\,\mathbf{1}_{\{a<c\leq b\}}. $$ The same principle applies to any Borel set: include the spike contribution precisely when that set contains \(c\). Because the slab is continuous, changing whether an interval includes either endpoint does not change its slab probability; it can change the full probability if that endpoint is \(c\).

Proof. Apply the set formula to \(A=(a,b]\). The spike indicator is 1 exactly when \(c\in(a,b]\), which is the condition \(a<c\leq b\). The slab term is \((1-p)\int_{(a,b]}g(x)\,dx\). A density gives zero probability to either endpoint, so this integral equals \((1-p)\int_a^b g(x)\,dx\). Adding the two contributions proves the formula. \(\square\)

Worked Example: A Spike at Zero With an Exponential Slab

Let \(p=0.30\), \(c=0\), and let the slab have the exponential density \(g(x)=e^{-x}\) for \(x\geq0\), with \(g(x)=0\) for \(x<0\). Its CDF is \(G(x)=0\) for \(x<0\) and \(G(x)=1-e^{-x}\) for \(x\geq0\). The full law’s slab weight is \(1-p=0.70\).

For \(x<0\), neither the spike nor any slab probability lies at or below \(x\), so \(F(x)=0\). For \(x\geq0\), $$ F(x)=0.30+0.70(1-e^{-x}). $$ At zero, \(F(0)=0.30+0.70(1-1)=0.30\), so \(P(X=0)=0.30\).

For the event \(0<X\leq1\), the interval excludes the spike, so $$ P(0<X\leq1)=0.70\int_0^1 e^{-x}\,dx =0.70(1-e^{-1})\approx0.4425. $$ For \(X\leq1\), the spike is included: $$ P(X\leq1)=0.30+0.70(1-e^{-1})\approx0.7425. $$ As a check, \(P(X>1)=0.70\int_1^\infty e^{-x}\,dx=0.70e^{-1}\approx0.2575\), and \(0.7425+0.2575=1\), up to rounding.

Worked Example: A Spike Inside a Uniform Slab’s Range

Let \(p=0.20\), \(c=4\), and let the slab be uniform on \([0,10]\), with density \(g(x)=0.1\) on that interval and zero elsewhere. Then \(G(4)=4/10=0.4\). Since \(4\) lies within the slab’s range, the CDF just below the spike is not zero: $$ F(4-)=0.80(0.4)=0.32,\qquad F(4)=0.20+0.80(0.4)=0.52. $$ The jump is \(0.52-0.32=0.20\), exactly the spike weight.

The interval \([3,5]\) contains \(4\). Its slab probability is \(0.80(5-3)/10=0.16\), and its spike probability is \(0.20\), giving $$ P(3\leq X\leq5)=0.16+0.20=0.36. $$ By contrast, \((4,5]\) excludes the spike. Its probability is \(0.80(5-4)/10=0.08\). The singleton \(\{4\}\) has probability \(0.20\), not zero, despite the slab having a density at 4.

Worked Example: A Spike at Zero With a Normal Slab

Let \(p=0.10\), \(c=0\), and let the slab be \(N(2,1)\), where the second parameter is the variance. Write \(\Phi\) for the standard normal CDF. The slab CDF is \(G(x)=\Phi(x-2)\), so $$ F(x)=0.90\Phi(x-2)+0.10\,\mathbf{1}_{\{x\geq0\}}. $$ For the interval \((-1,1]\), the spike is included. Its slab contribution is \(0.90[\Phi(-1)-\Phi(-3)]\), because the standardized endpoints are \(-1-2=-3\) and \(1-2=-1\). Thus $$ P(-1<X\leq1)=0.10+0.90[\Phi(-1)-\Phi(-3)] \approx0.10+0.90(0.158655-0.001350) \approx0.2416. $$ For comparison, \(P(X\leq1)=0.10+0.90\Phi(-1)\approx0.2428\), while \(P(X=1)=0\): the normal slab contributes no point mass at 1, and the spike is at 0.

Common Mistakes and Why the Distinction Matters

A frequent error is to treat the entire law as if it had an ordinary density. The expression \((1-p)g(x)\) is the density of the continuous contribution, but integrating it over a set containing \(c\) still does not account for the spike. A density assigns zero probability to a point; the extra mass must be added separately. Conversely, adding \(p\) to every probability is wrong: it belongs only to events that contain \(c\).

Another mistake is to decide whether the spike belongs to an interval by looking only at its endpoints informally. For \((a,b]\), the exact condition is \(a<c\leq b\). In particular, if \(a=c\), the interval excludes the spike; if \(b=c\), it includes it. Writing the set first and checking whether it contains \(c\) prevents endpoint errors.

This distinction matters whenever an exact value has positive probability alongside continuously varying outcomes. For example, an outcome may be exactly zero with positive probability while positive values vary continuously. Calculating a tail probability, a threshold event, or an interval probability then requires identifying whether the event includes that exact value before integrating the slab density.

Key takeaway: A spike-and-slab probability is the slab’s weighted integral over the event plus the spike weight if the event contains the designated value. The CDF reflects this rule through a jump of size \(p\) at \(c\).

Check Your Understanding

For each question, distinguish the point mass from the slab contribution.

  1. If a spike-and-slab law has spike value \(c\) and weight \(p\), what is \(P(X=c)\), and why does the slab not add point probability there?
  2. Write the CDF in terms of the slab CDF \(G\) for \(x<c\) and for \(x\geq c\).
  3. For the interval \((a,b]\), state the exact condition under which its probability includes the spike.
  4. A density \(g\) has \(g(c)>0\). Does that change the spike probability at \(c\)? Explain.
  5. Suppose \(c=2\), \(p=0.25\), and the slab assigns probability \(0.10\) to \((1,3]\). What is the full probability of \((1,3]\), and what is the full probability of \((2,3]\) if the slab assigns probability \(0.05\) to that interval?