# Continuous and differentiable bell-shaped distribution on $[a, b]$

Is there a distribution with these three properties?

• Supported on $$[a, b]$$ for any $$a, b\in\mathbb{R}$$ and $$a < b$$
• Continuous and Differentiable (that is $$\nabla_x p(x)$$ can be computed)
• Bell-curved (or at least not as flat as the Uniform(a, b))
• stats.stackexchange.com/questions/500862/…
– whuber
Sep 6 at 15:05
• General answer: let $f:[0,1]\to\mathbb{R}\cup\{\infty\}$ be any nonnegative integrable function that increases on the interval $[0,c)$ and decreases on $(c,1].$ On the interval $[a,b]$ define $$F_0(x) = \int_a^x f((t-a)/b)\,\mathrm{d}t.$$ Extend the function $F(x) = F_0(x)/F_0(b)$ to be $0$ on $(-\infty, a)$ and $1$ on $(b,\infty).$ By construction this has all the features you seek and every solution can be expressed in this form. The extreme generality of these solutions shows that you should be more narrowly focused on a solution that is meaningful for whatever application you have in mind.
– whuber
Sep 6 at 15:20
• @whuber +1. That indeed should be left as an answer; after all, it's a general construction. Sep 6 at 15:46
• @whuber great answer! Do you mind posting that as an answer? Sep 6 at 16:13

Let's construct all possible solutions.

By "distribution" you appear to refer to a density function (PDF) $$f.$$ The properties you require are

1. Supported on $$[a,b].$$ That is, $$f(x)=0$$ for any $$x\le a$$ or $$x \ge b.$$

2. $$f$$ should be (continuously) differentiable on $$(a,b)$$ with derivative $$f^\prime.$$

3. "Bell-curved," which can be taken as

• (Strictly) increasing from value of $$0$$ at $$a$$ to some intermediate point $$c;$$ that is, $$f^\prime(x) \gt 0$$ for $$a\lt x \lt c;$$ and
• (Strictly) decreasing from $$c$$ to a value of $$0$$ at $$b;$$ that is, $$f^\prime(x) \lt 0$$ for $$c \lt x \lt b.$$

To standardize this description, translate and scale the left-hand arm of $$f^\prime$$ to the interval $$[0,1]$$ and do the same for the right-hand arm, reversing and negating it. That is, let

$$g_{-}(x) = f^\prime\left((c-a)x\right)$$

and

$$g_{+}(x) = -f^\prime\left(1 - (b-c)x\right).$$

Both are increasing positive integrable functions defined on $$[0,1]$$ for which

$$\int_0^1 g_{-}(x)\,\mathrm{d}x = \int_0^1 f^\prime((c-a)x)\,\mathrm{d}x = \frac{1}{c-a}\int_a^c f^\prime(y)\,\mathrm{d}y = \frac{f(c^-)}{c-a}$$

and

$$\int_0^1 g_{+}(x)\,\mathrm{d}x = \int_0^1 -f^\prime(1 - (b-c)x)\,\mathrm{d}x = \frac{1}{b-c}\int_b^c f^\prime(y)\,\mathrm{d}y = \frac{f(c^+)}{b-c}.$$

Conversely, given any two positive increasing integrable functions $$g_{-}$$ and $$g_{+}$$ defined on $$[0,1]$$ (the "left side" and "right side" models), these steps can be reversed to construct $$f^\prime,$$ which in turn can be integrated (and normalized) to yield a valid distribution function.

Here is this reverse process in pictures. It begins with the two model functions.

(Notice that these functions need not even be continuous and can be unbounded, as illustrated by $$g_{+}$$ at the right.)

They are then integrated and assembled to produce $$f^\prime,$$ which in turn is integrated and normalized to unit area to yield a density $$f$$ with every required characteristic.

You may further control the appearance of the density in many ways. For instance, by taking the two models to be the same function and placing the peak $$c = (a+b)/2$$ at the midpoint, you will obtain a symmetric density. Here I have used the original $$g_{-}$$ for the right hand model $$g_{+}.$$

You can enforce many other properties of $$f$$ by going through the original analysis to deduce the corresponding properties of the model functions and restricting your construction to functions of that type.

Finally, if you choose to limit the two model functions to a finitely parameterized subset of the possibilities, you will have constructed a parametric family of distributions meeting all your criteria.

The Truncated normal distribution obeys all prerequisites:

• It's bell shaped
• It's continuous
• Its support is $$x \in [a,b]$$
• It's differentiable, i.e. $$\nabla_x p(x)$$ exists for all $$x \in [a,b]$$
• I just added a detail that I forgot about. I need it to be differentiable Sep 6 at 15:13
• @Euler_Salter no problem, the truncated normal distribution is also differentiable. Sep 6 at 15:37

One option is to transform a beta distribution.

$$Beta(3,3)$$ has your desired properties on $$[0,1]$$.

Now subtract $$1/2$$ to center the distribution.

Next, multiply to stretch or compress the distribution.