How should variables in statistics be understood? I had a slightly basic question about variables (particularly in statistics).
We would say that “height” is a variable. In my mind, “height” does not just represent different values, like 2, 45, or 75. It represents values + units: 2 feet, 45 feet, or 75 feet.
However, when we work with variables mathematically, I believe that we think of them as solely representing values / numbers. For example, we will say statements such as:
height = 2
weight = height + 4
weight = 6
It seems slightly confusing to me to have to think about variables in 2 different ways. Am I thinking about variables correctly? Thank you all for your help in advance!

Implicitly, there is a unit-conversion factor in front of the height. Thus, the full way to write it is something like:
$$
\text{weight (lbs)} = \dfrac{1 \text{ lbs}}{1 \text{ ft}}\bigg(\text{Height (ft)}\bigg) + 4\text{ (lbs)}
$$
It is typical to ignore units, and statistics tends to work out fine, but you are correct that the units are there and do sometimes need to be considered. For instance, if you wanted to calculate the weight for a subject who has their height measured in meters, you cannot just plug that number of meters into the equation. You would first have to convert the height in meters to a height in feet.
