# How to represent uniformity of a surface?

My knowledge of math is very basic, my statistics knowledge is even less. It was suggested to me that I try asking this question here, so here we go:

I am developing a software application that will measure and analyze properties of an object's surface. We want to determine how uniform the surface is and compare it to another object to determine which is "more uniform". Due to confidentiality issues as well as simplicity, I'll use an analogy of a dirt field:

• Field "A" is level, however it has many small pits and little mounds. All of the bumps and pits are pretty close to the same size, but they are everywhere on the field.
• Field "B" is also level and has much less pits and bumps than field A, however the pits and bumps it DOES have are quite large (and deep).

Let's say we have this great machine that can measure the the depth and height of the field in a 6" grid pattern - so we have this large set of data presenting an evenly spaced grid of points for each field.

The first part of my problem was to determine uniformity and after asking around and doing some research it seems that "variance" is what I was after. I am now determining variance by dividing the sum of the squared distances from the mean for each point, something like: 1. determine the mean 2. for each point, calculate the square of the distance from the mean 3. Divide the sum of squared distances by number of points.

So { 1, 3, 3, 2, 1 } = 0.8

Honestly I'm not sure I'm doing it correctly, but let's assume I am (for now). My next question is "what is 0.8?" It's my variance... OK, but how would I explain that to a layperson? Our application is not intended for the scientifically minded person, we basically want to convey the message that "Field A is smoother than field B" or "Field A, while it has more imperfections they are evenly spread out and not as intense as field B"

This is difficult to describe... I basically need to know what 0.8 "means"? Percentages are easy, you can say that "XYZ is 98% efficient" (at something) and most people can process that information and understand it. However I don't know how I can say "XYZ's surface is 0.8 uniform." The person would say "Well what does that mean? Is that good?"

That's my first problem: How to express uniformity in simple terms or relative to some other value that makes it easily understandable. If I plug some more severe numbers into my test program, say { 1,1,1,1,60 } I get a variance of 652.6875 - what!?

Please keep in mind, I really don't know what I'm talking about Math wise. What it boils down to is how to express uniformity of a set of values in a meaningful way to a layperson.

I also wasn't sure what tags to use, so if I missed some relevant ones please let me know.

-

I guess it says something about the quality of the Wikipedia article on variance that you weren't able to answer your question by reading it. I suggest that if this answer is helpful to you (and especially since it will be helping you with a commercial project for free), you could edit the Wikipedia article to fix it in that respect. In particular, I suspect whoever wrote this section had this sort of question on mind; perhaps you could improve on that if you see what was missing for you.

First, your calculation of the variance is correct in the first case, but not in the second (which is a bit weird if you used the same program to compute them). In the second case, the mean is

$$\mu=\frac{1+1+1+1+60}5=\frac{64}5=12.8\;,$$

so the variance is

$$\begin{eqnarray} \sigma^2 &=&\frac{4(1-12.8)^2+(60-12.8)^2}5\\ &=&\frac{4(-11.8)^2+47.2^2}5\\ &=&556.96\;. \end{eqnarray}$$

You can always check your answers for this sort of thing using Wolfram|Alpha. (In this case, make sure to use "population variance" in this case; "sample variance" is something slightly different; the difference is explained in a section of the Wikipedia article).

Now to your question what to make of this. The reason you can't relate these numbers to anything more immediately meaningful is that the variance is a squared quantity, i. e. its units are the square of whatever units your data has, so it's not meaningful to compare it directly to the data. What you need for that is the standard deviation, which is just the square root of the variance. It makes sense: You square all the deviations from the mean; the remaining operations just average those squares, so the result is an average square deviation, so to get something resembling an average deviation you need to take its square root. Note that you can't just skip squaring and taking the square root, because if you directly average the deviations from the mean, you always get zero. (You might want to try that out.)

In your examples, the standard deviations are $\sqrt{0.8}\approx0.89$ and $\sqrt{556.96}=23.6$, respectively. You can interpret this as something like an average deviation from the mean (keeping in mind that the literal average deviation from the mean is zero). A similar measure is the average of the absolute value of the deviations, which in your examples would be $0.8$ and $18.88$, respectively. For a discussion of the difference between these two measures and the reasons for preferring the standard deviation, see Motivation behind standard deviation?.

-