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.
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.
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.
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.
Check Your Understanding
For each question, distinguish the point mass from the slab contribution.
- 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?
- Write the CDF in terms of the slab CDF \(G\) for \(x<c\) and for \(x\geq c\).
- For the interval \((a,b]\), state the exact condition under which its probability includes the spike.
- A density \(g\) has \(g(c)>0\). Does that change the spike probability at \(c\)? Explain.
- 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?