0
$\begingroup$

Apologies if this is a really dumb question, at the moment I'm at a loss. I need help figuring out which statistical test to use for a case that's similar to the following scenario:

Say my hypothesis is that the distribution of favorite color is different on the West Coast versus East Coast.

I went out to the West Coast and took a sample of 1000 people and surveyed what their favorite color is. There are 30 possible colors to choose from, and for each color, I tabulated the number of people that reported it's their favorite. Then I sampled another 1000 unrelated people (assuming independent sampling) doing the same. Then I repeated this process say 8 more times. Now I have a mean number of people that prefers each of the 30 colors, as well as the SE.

Next, I went to the East Coast and repeated the procedures in the above paragraph.

Now, I have two distributions that measure the same thing (color preferences), and the variable has 30 categories (individual color). I know the mean and SE for each categories within these two distributions. What test should I use to see if the color preference distribution is different between East Coast and West Coast? I feel like I'm just getting confused by the 30 categories thing and overthinking it.

$\endgroup$
  • 1
    $\begingroup$ Why do you want to estimate a mean and standard deviation? You could look simply at the two distributions of the colors and compare the histograms. $\endgroup$ – Michael R. Chernick Mar 18 '18 at 3:57
  • $\begingroup$ To be the honest, the reason is petty. I want an error bar on the mean distribution. I do have the option of tallying up all the samples on each coast and pretend they are one big sample, but I'd like to show a possible range of mean frequency. If I simply compare the histograms, is there some sort of statistic I can report to show whether the two distributions are significantly different? $\endgroup$ – Adela Mar 19 '18 at 20:17
  • $\begingroup$ Your counts define a contingency table with 2 rows and 30 columns, use chi-square. $\endgroup$ – kjetil b halvorsen Jan 26 '19 at 18:30
1
$\begingroup$

If you want to use a statistical test to compare a sample distribution to a hypothesis distribution, I believe you should use the Chi Square Goodness of Fit test. However, this test is sensitive to sample size. You could also just compare the histograms, as was mentioned in a comment. With such a rigorous method, it would be good to collect some qualitative data simultaneously.

EDIT: without leaving the frequentist world, a multinomial logistic regression may be more effective for your needs. UCLA has a great set of instructions on how to use this method in R. If you are interested in a Bayesian approach, I would assume a uniform prior is appropriate.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ The sample sizes mentioned are pretty large. $\endgroup$ – Glen_b -Reinstate Monica Mar 18 '18 at 9:20
  • $\begingroup$ Actually, the large sample size is only in the example, in my actual data set, the sample is fairly small, with many bins having 5 or fewer items, which is why a regular Chi Square Goodness of Fit doesn't work well. I tried doing an exact test using the Xnomial package on R, and it gave an error message because there are too many categories. If I simply compare the histograms, is there any sort of statistic I can report to show whether the two distributions are significantly different or not? $\endgroup$ – Adela Mar 19 '18 at 20:14
  • $\begingroup$ @Adela See my edit above. If it answers your question, feel free to mark it. Otherwise, let me know if have other questions. $\endgroup$ – Jay Schyler Raadt Mar 20 '18 at 3:06
0
$\begingroup$

Seems to me like you can think of it as a contingency table test.

You have two rows: East coast and West coast.

You have one column for every color.

Each entry in the table is the number of people from that coast, with that favorite color.

You can use a chi-squared test for this, which would be "prop.test" in R.

| cite | improve this answer | |
$\endgroup$
-1
$\begingroup$

I think you want to use the Kolmogorov-Smirnov test.

| cite | improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ The categories in the question are unordered. How is that supposed to work? See the first sentence of your link, which explains it is a test for continuous variates. Even if you modify the critical values to work with the pattern of ties you get with an ordered categorical variable, it's not going to give an ordering to colors. $\endgroup$ – Glen_b -Reinstate Monica Mar 18 '18 at 9:19

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.