3
$\begingroup$

Say I have a random variable $X\sim \mathcal{N}(0,1)$. Which transformation do I need to apply to $X$ to get a zero-censored normal distribution?

$\endgroup$
1
  • $\begingroup$ What do you mean by censored? I would think you meant "centered" but a N(0,1) distribution is centered already at 0 $\endgroup$
    – jros
    Feb 22, 2022 at 17:42

1 Answer 1

6
$\begingroup$

Censoring basically means replacing all experimental values outside a given, prespecified set of values with an indication that they are outside that set: these are the "censored" values. When we write of censoring, we almost always mean we are actually interested in the properties of the system that could create the actual uncensored values: the underlying distribution. Censoring gets in the way of doing that and is usually considered a problem.

Censoring does not create a new random variable, though. Usually it's a poor idea to replace all the censored values with a single finite number, because although that makes it possible to run almost any standard statistical procedure, it rarely gives results that accurately reflect properties of the underlying distribution.

On the occasions that such a numerical coding is adopted, we obtain an "inflated" or "spike" or "delta-modified" distribution. A common example is to replace all values of a lognormal distribution that are less than some threshold $t$ by zero. This produces a "delta-lognormal" distribution.

These "delta-modified" distributions can be viewed as noninvertible transformations of the underlying random variable. For instance, a delta-Normal distribution censored at the left at a level $t$ arises by censoring all values outside the interval $[t,\infty)$ and replacing the censored values by some constant $T.$ The transformation of such a random variable $X$ can be written in many ways mathematically, such as

$$f(X) = \left\{\begin{aligned} X & \quad X \ge t\\ T & \quad X \lt t\end{aligned}\right.$$

This creates a singular distribution, making it difficult to visualize with a density function. The cumulative distribution function, though, always exists. Here is what it looks like for a left-censored Normal distribution at $t$ with a replacement value of $T \le t,$ the black curve:

Figure

The dotted red line is the original Normal CDF. All its probability to the left of $t$ has been placed at the value $T.$ That is, whereas before this curve rose gradually from the left to a height of around $1/3$ at $x=t,$ now the black curve just makes a sudden jump to that height at $x=T$ and otherwise its height never changes until $x=t.$

$\endgroup$
2
  • 1
    $\begingroup$ would you be so kind and disclose also the underlying code? Thanks $\endgroup$
    – Maximilian
    Feb 23, 2022 at 8:46
  • 1
    $\begingroup$ @Maximilian Consider directly implementing the formula in this answer using ifelse. The black curve, for instance, is a graph of function(x, cdf=pnorm, threshold=0, replacement=0, ...) { p <- cdf(threshold, ...); ifelse(x < replacement, 0, p) + ifelse(x >= threshold, cdf(x, ...) - p, 0) } $\endgroup$
    – whuber
    Feb 23, 2022 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.