2
$\begingroup$

Suppose I have a normal distribution $A \sim \mathcal{N}(\mu,\sigma^{2})$ with a known cuttof point (percentile) on this distribution called $o$. Based on this point the distribution needs to be transformed which leads to a new distribution called $W$. Next, suppose $s$ equals a deterministic value. $o$ and $s$ are known in advance and do not need to be estimated. The first part of $A \in [-\infty,o]$ becomes deterministic and equal to $o+s$, the second part $]o,+\infty]$ remains stochastic and is equal to a transformation of $A$ more specifically $\mathcal{N}(\mu+s,\sigma^{2})$

So summarised: $W = \begin{cases}o+s & \text{if } A \leq o \\ A+s & \text{if } A > o \end{cases}$

I want to find an expression for the pdf of $W$.

More specifically in my application A represents the arrival time distribution at a customer and $o$ represent the opening time at that customer. If you arrive to early you will have to wait before you can serve (service time is equal to $s$) the customer.

My current (unsuccesfull) solution approach for the case in which $\mu=10,\sigma=1,o=11,s=1$ is as follows I think W is the component mix: $W= P(A\leq o)*(o+s)+ P(A>o)*(A+s),$

I entered this in mathematica (see picture below)

Furthermore, I programmed a monte carlo simulation executing 100000 iterations. The new distribution has a mean equal to $12.08$ and a standard deviation equal to $0.26$.

enter image description here enter image description here

$\endgroup$
10
  • 1
    $\begingroup$ $W$ has a censored Normal distribution (censored below at $c$). Then, the pdf of $W$ has a discrete mass at the point $c$, and a continuous component for $A > c$. This is not reflected in your plot above, and so your plot and working are faulty. $\endgroup$
    – wolfies
    Commented Nov 13, 2014 at 13:33
  • $\begingroup$ Also, how can you run a simulation (or make a plot) without specifying a value for $c$? $\endgroup$
    – wolfies
    Commented Nov 13, 2014 at 14:02
  • $\begingroup$ thanks for the remark, this was an error, there should be no $c$ variable only an $o$. $\endgroup$ Commented Nov 13, 2014 at 14:34
  • 2
    $\begingroup$ In the definition of $W$, what is the relationship between "$\mathcal{N}(\mu+s,\sigma^{2})$" and "$A$"? Do these represent independent variables--as the notation suggests--or is the former indeed some "transformation" of $A$? If the latter, exactly how is $A$ being transformed? $\endgroup$
    – whuber
    Commented Nov 13, 2014 at 15:24
  • 1
    $\begingroup$ @cevertje400 very well. However, please answer: are either $o$ or $s$ known here or must they be estimated from data? For instance, in the case of screening for CD4 count in HIV positive persons, we know that values lower than 400 are returned as "indeterminable", so the thresholding level is known. $\endgroup$
    – AdamO
    Commented Nov 13, 2014 at 16:51

1 Answer 1

5
$\begingroup$

I can't bring myself to use an 'a' or $A$ for a random variable (or an 'o' for a constant), so will swap for $X$ and $c$.

The problem

Let $X \sim N(\mu,\sigma^2)$ with pdf $f(x)$, and let $c$ and $s$ denote constants.


(source: tri.org.au)

Then, random variable $W$ has a censored distribution, where:

$$W = \begin{cases}c+s & \text{if } X \leq c \\ X+s & \text{if } X > c \end{cases}$$


(source: tri.org.au)

The tail of $X$ to the left of $c$ becomes the discrete mass at $c+s$, with mass $P(X \leq c)$ (the blue point). The tail of $X$ to the right of $c$ gets shifted to $X+s$.


As to computation of $E[W]$:

Define:


(source: tri.org.au)

Then, $E[W]$ is:


(source: tri.org.au)

where I am using the Expect function from the mathStatica package for Mathematica to automate the computation, and Erf denotes the error function.

For the given parameter values:

{$\mu$ -> 10, $\sigma$ -> 1, c -> 11, s -> 1}

... this yields: $\frac{1}{2} \left(\text{erf}\left(\frac{1}{\sqrt{2}}\right)+23\right)+\frac{1}{\sqrt{2 e \pi }} \approx 12.0833$ as per OP's simulation.

Suggestion

The inclusion of constant $s$ is an unnecessary distraction. A neater way of modelling this is to define:

$$Y = \begin{cases}c & \text{if } X \leq c \\ X & \text{if } X > c \end{cases}$$

and $$W = Y + s$$

$\endgroup$
2
  • $\begingroup$ Thanks for the solution, I bought mathstatica now and copied your solution. But how did you draw the pdf of the censored distribution $W$ ? $\endgroup$ Commented Nov 14, 2014 at 13:47
  • $\begingroup$ Go to Chapter 2, Section 2.5 C - Censored Distributions of the Rose/Smith book: see Figure 20. Figure 20 plots the distribution of $Y$ in my answer above. I just adapted that for your case (+s). To view the code that generated the figure, click on the little triangle under the diagram, ... |> Fig. 20 ... and the code will appear. If you want the actual code to generate the plot above, let me know and I can send it to you. $\endgroup$
    – wolfies
    Commented Nov 14, 2014 at 14:31

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.