Suppose I roll a die. What are the probable outcomes?
- Exactly 1 or exactly 2 or exactly 3 or exactly 4 or exactly 5 or exactly 6.
- No number in between.
Let’s put another example: if I want to know the height of people in my colony, what are the outcomes?
4.5 ft, 4.1 ft, 5.5 ft………. any number.. May be upto 6.5 ft….
Now, can we count it by hand? Any number can be present in between of any two. This is called continuous variable.
Next, I want to know the categories of subjects in xyz college for any year. What are the outcomes? – Math, Computer Sc, Physics.
This is called categorical variable.
We can represent categorical variables as discrete variables to work in machine learning algorithms and there are other ways to do it as well (one hot encoding etc).
Random variables are outcome of any incident or scenario and it always depend on scenario and it must be numaric (that is why it is mandatory to convert categorical variable into numaric form).
I hope you like my article. Please stay tuned for next post.