# Can non-parametric data have mean value and standard deviation?

I understand that for non-parametric data, the probability density function (pdf) cannot be obtained using parameters like (mean value) and (standard deviation), and I understand that we use Kernel Density Estimation to estimate pdf. However, for any non-parametric data, can I still estimate (mean value) and (standard deviation) ? For example, can I use Matlab commands (mean(x)) and (std(x)) to estimate mean and standard deviation? Thanks

• This is not a criticism of you, because you echo an error appearing in some prominent books; but there is no such thing as "non-parametric data." "Non-parametric" refers to a probability model of data. The answer to your question depends on the model you have in mind. If all distributions in your model have means and standard deviations, you can find a huge number of ways to estimate them both (and a deeper question, but one that is extremely general, concerns how to find "good" estimators).
– whuber
Commented Apr 12, 2022 at 11:45

You have to assume that the mean and variance exist, but once you do, $$\bar X$$ is always an unbiased estimator of the mean, and $$s^2$$ is always an unbiased estimator of the variance. You don't need to make any parametric assumptions for those to hold. Those are unbiased for normal distributions, Poisson, binomial, exponential,...

EDIT

Note that, even though $$s^2$$ is an unbiased estimator of $$\sigma^2$$, $$s$$ is (amazingly) a biased estimator of $$\sigma$$.

EDIT 2

To correct a comment from a few hours ago, an unbiased estimator $$\hat\theta$$ of a parameter $$\theta$$ has the property that $$\mathbb E[\hat\theta]=\theta$$, and bias is a technical term in statistics that refers to $$\mathbb E[\hat\theta-\theta]$$.

The Wikipedia article on bias includes some additional technical details.

• Thank you very much for your answer, could you please explain to me why you said 'unbiased'. And do you think I can make an argument (discuss research outcome) using the estimated mean and standard deviation? Commented Apr 12, 2022 at 15:47
• "Unbiased" is a technical term in statistics meaning that an estimator $\hat\theta$ of a parameter $\theta$ has the property of $\mathbb E[\hat\theta] = \theta$.
– Dave
Commented Apr 12, 2022 at 17:00
• Bias is only somewhat interesting as a characteristic of the quality of an estimator. I think it receives too much unwarranted attention, and this is one example. The OP does not mention bias, while the answer refers to bias as the single characteristic to be mentioned. We may often care more about the distribution of loss (and particularly the expected loss) that results from an estimate missing its target. Bias by itself tells us little about that. Commented Apr 12, 2022 at 22:24
• @RichardHardy: The sample mean & sample variance as estimators of their population analogues from i.i.d. samples tick some other boxes. They're consistent when the population mean & variance exist, & permutation-invariant, which is to say functions of the order statistic - the minimal sufficient statistic in various broad non-parametric families. When the order statistic is also complete (as in e.g. the family of continuous distributions having a mean & variance), they have the lowest expected loss among unbiased estimators for any convex loss function. Commented Apr 15, 2022 at 8:45
• @Scortchi-ReinstateMonica, this kind of information is what I was missing in the answer. Commented Apr 15, 2022 at 8:54