According to my understanding regarding discrete and continuous random variables is that discrete random variables are variables that can take finite values that have resulted from a finite number of outcomes or if the values are infinite but still countable ( whole numbers) then the variable is also classified as a discrete random variable. On the other hand , if the random variable can take any value from an infinite outcomes set or if it can be assigned any value from a finite interval ( whole and decimal numbers so that the possible values are infinite ) then it is called continuous random variable. Now for a certain random experiment , let the set of possible values of a random variable to be {1 , 1.2 , 1.2222 ,1.2554 , 2 , 2.54 ,2.66666 ,3} , then the random variable is classified as a discrete or continuous random variable ? I am confused here , since this sample space is finite and hence it is discrete random variable , however , the possible values include whole and decimal numbers so can it be classified as a continuous random variable ?
Random Variables – Understanding Continuous and Discrete Random Variables
mathematical-statisticsrandom variable
Related Solutions
Grew too long for a comment:
Counts are discrete, the fact that they can go to infinity doesn't change that.
What makes a variable discrete:
If you can enumerate the values the variable can take ('call this value the first one, that the second one, ...') and never miss any (associate them one-to-one with the natural numbers), then the variable is discrete.
If the sample space is countable, your variable is discrete.
This means, for example, that even the difference of the square roots of two Poisson variables is discrete, even though for any two distinct values, there's always more values between them.
Variables that are counts ("the number of..."), of course, are countable.
Heck, counts can't take values between the integers; 'on a lattice' is as discrete as they come; but (as mentioned already in the different of the square roots of two Poissons example) you don't have to have a lattice to have a discrete r.v.
(response from comments)
@DilipSarwate I agree it's weird (it's equally as weird for the case I mentioned and for the same reason; I'd have mentioned that example as well, but figured it would be overkill to have two examples). But that's what discreteness really is.
[As for difficulty finding probabilities from the pmf, consider $X$, $Y$ and $Z$ all geometric. $X + \pi Y + \sqrt 2 Z$ is plainly discrete, yet some probabilities that may arise for it could be awkward to evaluate also. That doesn't suggest it's ill-defined, only that it's not nice to work with.]
There are an infinite number of ways of assigning probability to each of the rational values in [0,1] of course. Here's one example:
- take $X$ as Poisson $\mu$, $Y$ as (independent of $X$) Poisson $\lambda$, where we condition on $X+Y\neq 0$ and then $V = X/(X+Y)$ is a random variable on the rationals in $[0,1]$. The probability you ask for is just $P(X\leq Y)$ and could be computed in that instance [NB Aside from excluding $X+Y=0$, $X-Y$ has a Skellam distribution]; variables like this really can arise in practice, and even when you can't do the probability calculation algebraically (though in this case you could at least do it numerically to effectively any required bound on accuracy), you can always simulate the required calculations from the definition; the things are well-defined even in cases where they're hard to compute directly.
Of course, we could order the positive rationals using the usual argument based on progressing diagonally along the array $v(i,j)=i/j$ (i.e. $(1,1)$, $(1,2)$, $(2,1)$ $(1,3)$, $(2,2)$, $(3,1)$ but omitting fractions not in simplest form) - only one of an infinite number of ways of doing so - and just assign probabilities from any distribution on the natural numbers (don't ask me what practical use that could have) ... while that might make evaluating the probability that you ask for difficult to evaluate (at best), that doesn't mean it's necessarily ill-defined. Similar constructions on rationals in $(0,1)$ are easy to manage, by staying keeping to $i<j$ and we can incorporate $0$ and $1$ by placing them at the start. Even so, since this doesn't seem to have practical use, I am not sure it's necessarily a big concern that probabilities may be hard to evaluate but since we seem to be wandering into issues about which I know little, I'll leave pursuing further discussion of the rationals in $[0,1]$ aside.
Further edit:
@DilipSarwate I like to make things as simple as possible without saying something that's false. The problem is, I don't think that it is actually true that it is always possible to find an interval $(a,b)$ such that $x∈(a,b)$ and $X$ does not take on any other value in $(a,b)$. In fact, I believe the two examples discussed here are counterexamples - I think for both there's no interval where $a<b$ that won't have probability.
That is, there are discrete cases where there's no empty finite interval - as soon as it has any size at all, there's some points in there.
Edit: the Wikipedia article on Discrete random variables seems to agree -
In cases more frequently considered, this set of possible values is a topologically discrete set in the sense that all its points are isolated points. But there are discrete random variables for which this countable set is dense on the real line (for example, a distribution over rational numbers).
That is, while usually we deal with cases where points are isolated, it's not always the case.
I made the admittedly complicated comment in the later part of my answer because one of the earlier comments looks to me like it was saying something untrue (in fact the same thing that you now suggest).
I'd make a simpler statement in response if I could see a good one that I wasn't pretty sure was wrong.
Is there a simple way to say it?
If you have a finite number of samples then your intuition is correct that the sample mean cannot take certain values. You mention that the discrete values are integers so clearly their mean cannot be irrational.
We know from the central limit theory that the sample mean tends to a continuous distribution as the sample size becomes large.
Even though a finite sample size doesn't technically create a continuous distribution, if your sample size is large or if the distance between discrete values is small for your purposes then you really should consider modelling it as a continuous variable.
Best Answer
It depends whether the set of possible outcomes $\Omega$ is countable (which includes some infinite sets) or uncountable. In the former case, you have a discrete random variable (RV), in the latter case a continuous one.
For the geometric distribution with $P(X=m)=p(1-p)^{m-1}$, e.g., the set of possible values $m=1,2,\ldots$ is infinite, but only countably infinite and it is thus a discrete RV with $\sum_k P(X=k)=1$. This is an example of countably infinte set, which means that there is a bijective mapping between the set and the natural numbers.
A finite interval of real values, in conmtrast, is an uncountable set because there are uncountable possible values in between. It can be proven that such a set is uncountably infinite, i.e., there is no bijective mapping onto the natural numbers.
In case of interest, please have look at Cantor's set theory (the link is to an informal introduction).