0
$\begingroup$

This section deals with concepts and procedures for testing inferences about proportions that involve the normal distribution. Following a discussion of the concepts related to tests of proportions, inferential tests are presented for situations when there is a single proportion, two independent proportions, and two dependent proportions.

This text is from is from: An Introduction to Statistical Concepts [3 ed.] p.207.

That book describes all those tests using z-test for proportions.

Question: How can I check if nominal and ordinal data is normally distributed?

I have look at that questions but it does not provides answer to my question: How can I determine if categorical data is normally distributed?

$\endgroup$
  • $\begingroup$ Proportions are neither nominal nor ordinal - they are continuous values. You don't need to check if your categories are normally distributed (which makes no sense anyway, as categories have no order), the test assumes that your proportion measure is normally distributed. $\endgroup$ – Nuclear Wang Nov 6 at 20:44
  • $\begingroup$ @NuclearWang you mean "sampling distribution of proportion" for "standard error of proportion" estimation? $\endgroup$ – vasili111 Nov 6 at 20:46
2
$\begingroup$

Some thoughts for you to consider

For ordered categorical variables, you could simply apply z-transformation. This is done by subtracting mean from your variable and then dividing by the variable's standard deviation. Then, you could simply inspect histograms. Mind you, there are many ways of determining what is classed as "normal". You may find some older threads on this topic useful. I have to caution you that although the normality of ordinal variables is routinely inspected in many social sciences, it usually should not even be done. This is because ordinal variables are typically measured with only a few categories, which are insufficient to provide a reasonable approximation of continuous data.

Also, you may benefit from reading some excellent arguments as to whether it even makes sense to test for normality

Note that for some types of analyses, such as, the OLS, it is the normality of residuals that is important, rather than normality of each individual variable in the model.

For nominal variables (i.e. discrete categories), it is uncommon and perhaps meaningless to verify their normality since such variables are effectively separate groups without any logical ordering (for example car brands).

$\endgroup$
2
$\begingroup$

This is a tricky question.

First, I think a lot of people will denounce the idea of using a z or t test on data which are not continuous. "Your data are ordinal/nominal, use a different test!" they will cry! And they are not wrong; your data are not normal even in theory, so a different test truly is best.

But are those other tests necessary? I argue no.

Let's set up a little experiment. I'm going to generate some ordinal data 1 through 5 and run a t test on those data. I will assume they come from a normal (they really don't, they come from a multinomial with approximately symmetric probabilities around the median). Let's see if a) The data pass some sort of normality test like the shapiro wilk, and b) if the false positive rate is maintained.

Here is some code.

library(tidyverse)


gen_data<-function(){
  x = c(-Inf, -2, -1, 1, 2, Inf)
  p = pnorm(x[2:6]) - pnorm(x[1:5])

  y = sample(1:5, replace = T, size = 100, prob = p)
  return(y)
}

data<-rerun(1000, gen_data())

shap_wilk_results<-map_lgl(data, ~shapiro.test(.x)$p.value<0.05) %>% mean()

fpr <-  map_lgl(data, ~t.test(.x, mu = 3, var.equal =F)$p.value<0.05) %>% mean

If you run this code you will find 2 things: 1) We almost always reject the null of the shapiro wilk test, so our data are sufficiently not normal, and 2) the false positive rate for the t test is approximately 5% right where it should be.

So what is my point? My point is that even when your data are not normal, you can still use the t test and maintain some of the frequency properties that really matter (I haven't checked power here, but I imagine it is maybe lower).

Back to your question. You ask "how can I check normality", but after what we've seen here I think a better question is "does normality even matter for some of these tests?". The answer, in my opinion, is no. The z and t seem to do well so long as the data are symmetric, and maybe for your purposes that is all you need to check and then just make the assumption the data are normal anyway.

$\endgroup$
  • $\begingroup$ Fantastic answer! $\endgroup$ – Michael M Nov 6 at 21:30
  • $\begingroup$ @MichaelM :) thank you $\endgroup$ – Demetri Pananos Nov 6 at 21:32
0
$\begingroup$

I don't think z-test is for normality test, it is used to determine whether two population means are different when the variances are known and the sample size is large. And one assumption of z-test is the data follows normal distribution.

Usage of z-test: http://www.stat.ucla.edu/~cochran/stat10/winter/lectures/lect19.html

Density plot and Q-Q plot can be used to check normality visually.

If you need an actual test, you can use such as Kolmogorov-Smirnov (K-S) normality test and Shapiro-Wilk’s test.

All of these tests have libraries in R or python.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.