-1
$\begingroup$

Suppose I have two categorical variables: 1. Person, and 2. Color of clothes. Each person will wear different color of clothes and will be asked to walk along a line back and forth (like random walk) and stop after 10 seconds. The following is the table of position of each person with different clothes after 10 seconds (w.r.t. the origin):

A B C D
Red -1.3 5.2 6.2 5.5
Blue 6.2 -3.2 4.9 4.9
Green -5.1 -8.3 20.1 4.6
Black 4.9 3.14 40.5 -1.5

(all measurements are in meter)

Now, I want to verify if there is any association between variable Person and variable Color.

  1. There are two categorical variables, and if all values were positive, I could perform Chi-squared test. However, Chi-squared cannot be applied since the table contains negative value. What test should I perform instead?

  2. In addition to two categorical variables, suppose that I have another continuous variable. Hence, $F: C_1 \times C_2 \times \mathbb R \rightarrow \mathbb R$, where $C_1, C_2$ are categories 1 and 2, respectively. If so, what test should I perform? Or is there a way to create a model (or an equation) that predicts the outcome?

Thank you in advance.

$\endgroup$
14
  • 4
    $\begingroup$ What do the labels mean? You can't perform a Chi-squared test unless (at the very least) these "labels" are counts of independent occurrences. Obviously a negative value isn't a count. This raises a prior question: what are you really trying to learn about these data? How were they generated and measured? $\endgroup$
    – whuber
    Jan 26, 2023 at 18:35
  • 1
    $\begingroup$ Question #1 is a reasonable question, and it comes down to what @whuber commented: those negative values must mean something (or be typos). // Question #2 is a legitimate question but is sufficiently different from question #1 that it warrants its own post. $\endgroup$
    – Dave
    Jan 26, 2023 at 19:10
  • $\begingroup$ I edited the question so that you could see what I meant more clearly. $\endgroup$
    – James C
    Jan 26, 2023 at 20:41
  • 2
    $\begingroup$ It would probably be best to state what your data actually are, not just something that they could be 'like'. Whether they are called "properties" or "labels" is irrelevant. What are they actually? What are the numbers measurements of? Your question arises from some confusions about the situation and the test, so the clearer you can put it, the better off everyone will be. $\endgroup$ Jan 26, 2023 at 20:41
  • $\begingroup$ @gung-ReinstateMonica I edited the question. Hopefully it clarified what I meant. $\endgroup$
    – James C
    Jan 26, 2023 at 20:43

1 Answer 1

1
$\begingroup$

Person and color are independent in your setup.

Person A wears each color exactly once. Person B wears each color exactly once. Person C wears each color exactly once. Person D wears each color exactly once.

Red is worn by each person exactly once. Blue is worn by each person exactly once. Black is worn by each person exactly once. Green is worn by each person exactly once.

Therefore, the probability of wearing a particular color does not depend on the person, and the probability of a particular person performing the walk does not depend on the color. No matter what, if you see a color, there is a $0.25$ probability of being each person, and if you see any person, there is a $0.25$ probability of that person wearing each color.

$\endgroup$
4
  • 1
    $\begingroup$ Your questions about how color impacts the direction someone walks are separate and really warrant a separate post that contains considerable detail about your experiment. For that, you seem to have two predictors of location, which sounds like the beginning of a fairly standard regression model. $\endgroup$
    – Dave
    Jan 26, 2023 at 20:54
  • $\begingroup$ "how color impacts the direction someone walks", that is what I wanted to know. $\endgroup$
    – James C
    Jan 26, 2023 at 21:01
  • $\begingroup$ This is the correct answer to a question, but it is unlikely that what is written on this page is closely related to whatever question lies behind the OP's study. I voted to close. $\endgroup$ Jan 26, 2023 at 21:02
  • $\begingroup$ @JamesC Then please ask that (interesting) follow-up as a new question. How to include that additional variable in your question #2 would make sense to discuss there, too. However, if you "want to verify if there is any association between variable Person and variable Color," then the answer is that you filled in the wrong values in your contingency table. Every value should be a $1$, and the chi-squared test will report no association between person and clothes color, as the experimental design intentionally makes the two independent. $\endgroup$
    – Dave
    Jan 26, 2023 at 21:12

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