Apologies for terminology inconsistencies, as I'm reading a Chinese statistics and probabilities textbook while looking up intrinsics on an English encyclopedia.
This arose when I was reading the definition of expected value (a.k.a. mean according to my textbook) for a continuous random variable $x$ which is:
$$E(X)=\int^{\infty}_{-\infty}xf(x)\text{d}x$$
Where $x$ is the random variable, and $f(x)$ is the probability density function.
At first, I wasn't able to make sense of it : it's the product of 3 variables (I know $\text{d}x$ is a special symbol, but let's assume we're doing a brute-force calculation by setting it to a really small value) - which means the unit must be very strange. By unit, I mean things like meters, seconds, kilograms, etc. (I know all 3 are supposed to be from the set of real numbers, but let's suppose they've got types like programming language variables).
But then I thought: the $\text{d}x$ doesn't need to have a unit - it just need to approach a very small value whilst making sure everything's consistent.
So Q: Is my interpretation of the formula for expected value reasonable and sound? Can variable and its differential have different unit (as in one is of a unit while another can have another or being completely unitless)?