Does a sample of a random variable is a sample of a random variable minus a constant?

31 Views Asked by At

my question is the following: let $X$ be a real random variable, $b\in\mathbb{R}$ and $X_{1},\cdots , X_{n}$ a sample of $X$ independent and identically distributed. My question is whether or not $|X_{1} - b|,\cdots , |X_{n} - b|$ is a sample of the real random variable $|X - b|$.

Thanks in advance.

1

There are 1 best solutions below

0
On

Yes. Consider this example:

Let $X \sim \mathsf{Unif}(1,4)$ and $b = 2.$ Then let $Y = |X-2|.$

Simulation in R:

set.seed(2020)
x = runif(10^5, 1, 4)
y = abs(x - 2)
summary(y)
     Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
0.0000401 0.3695657 0.7426899 0.8283916 1.2438975 1.9999862 

hist(y, prob=T, col="skyblue2")

enter image description here

What do you suppose is the density function of the random variable $Y?$