# How to bridge between seemingly unrelated but congruent PDF and PMF?

Let's assume a probability mass function $P$ on the discrete domain $\{0,...,N\}$ and a density function $f$ and the existence of two real factors $a$ and $b$ so that we have for all numbers $k$ in $\{0,...,N\}$:

$$P(k) = a * f(k * b)$$

What can be said about the theoretical / mathematical relationship between $P$ and $f$? Can $f$ be used to understand $P$ and vice versa?

(I hope my question is not too fuzzy - in case it is, I would adjust it according to suggestions)

library(VGAM) #drayleigh

N <- 100
p <- function(k,N) k/N * ifelse(k>1, prod(1 - (1:(k-1)/N)), 1)
plot(1:N, sapply(1:N, p, N))

a <- 0.104
b <- 1 / 9.7
points(1:N, drayleigh(1:N * b) * a, col="red", type="l")


p defines a random process (I think it is a Markov chain) that will sample from {0,1} until 1 is chosen and then stops. The probability of choosing 1 increases linearly from 0 to 1 within N+1 steps.

The Rayleigh distribution is a special case of the Weibull distribution which is used for modelling mortality. The process I define above could obviously serve as a very simple model for mortality - the older you get the higher the probability of dying until an age of 100 where dying can be considered as certain.

But I am wondering whether I could f.x. infer from my simple process an intuitive idea that helps understanding what the Rayleigh distribution captures. And because I expect this situation to come up again in the future I am asking for a general answer. But of course insights into this specific context are welcome.

Here is one possibility (for $b\neq 0$): let your $P$ be the probability mass function of a random variable $X$ and let $Y$ have the same distribution as $bX$. Then we see that $$P(X=k)=P(bX=bk)=P(Y=bk)=af(bk)$$ where $a=1$ and $f=P$. Now if you let $a$ be any real number, you will in general not get a probability mass function on $\{0,\ldots,bN\}$ but a multiple of it, a signed measure.
Because $P$ is a probability mass function, $af(bk)$ must be nonnegative for all $k\in\{0,\ldots,N\}$ and fulfil $\sum_{k=0}^N af(bk)=1$. So clearly $a\neq 0$. Without loss of generality, assume $a>0$ (if not, replace $f$ by $-f$). Because $a>0$ and $P$ defines a probability measure, also $f$ must be nonnegative. We now find that $a = 1/(\sum_{k=0}^N f(bk))$. Now define the function $g$ on $\{0,b,\ldots,bN\}$ via $g(bk)=af(bk)$. Then $g$ is the probability mass function of $bY$. So you see that $b$ scales the state space of the random variable $X$ while $a$ may be any positive number that just scales the total mass of $f$, with the total mass of $af$ being one.