I am conducting an experiment and I have two groups of participants (controls/ treated; 50 each). For each participant, I performed 40 measures with 3 possible outcomes (A, B, C) and recorded the accumulated frequencies (for example: control1: 10A, 20B, 10C; Control 2: 20A, 10B, 10C...). Now, I want to analyze whether the group is associated with these frequencies and I think the proper way to do so would be a contingency table (2x3) followed by chi-square test. I did so, but now I want to report this result and one doubt arises: It is obvious that the degrees of freedom =2 but I am unsure about which is the value of N.... Is it 100 (the number of participants) or is it 4000 (100 participants x 40 measurements)? The second option seems more reasonable to me but I would appreciate a confirmation or any necessary correction

Thanks in advance.