# t-test/chi squarred test or mcnemar test?

To what extent does the effect of presence of music differ for the concentration ability in playing a memory recall game in males and females?

So basically I had 50 students (25 females and 25 males) take the test in silence and the next day with music. I'd like to perform some statistical test to see if the variables are independent, for example if the number of correct answers given by the students depends on whether there is music present or not.

And also if there is difference between males and females on this regard. Hence, these two things need to be tested. So I would love to have some suggestions on this, a t-test/chi squared test/ McNemar test are the ones I am thinking about, but I'm really not sure which one will be more appropriate.

• # of right answers with music, # of right answers without music for female. # of right answers with music # of right answers without music for male. this will be the headers for the table. May 4 '18 at 11:09

You should counterbalance the order that the subjects get music versus no music. Everyone may do better on the second day simply do to a practice effect. Thus, you will need an even number of males and females (and I recommend a larger sample size!). If you maintain balance (equal sample sizes) in all conditions, you can analyze this with a 3-way ANOVA (sex by music by order). Sex and order would be between-subjects factors and sex is a within-subjects factor.

• Okay if I understood it correctly, do you mean like, say, I should have 20 females performing the test with music on the first day and other 20 on the second, and another 40 doing it exactly the opposite way. Or do I do it using the same test subjects? With a different test and some other day? May 4 '18 at 14:12
• Correct, some do music then no music, others do it the other way around. May 4 '18 at 14:13
• And what kind of factor will music be then? I'm actually not familiar with the ANOVA test so, if you could make it clearer. thank you! May 4 '18 at 14:24
• Music is a repeated (within subjects) measure or factor. Sex and order are independent or between-subjects factors. Thus, you have a 2 by 2 by 2 mixed factorial design (within by between by between). Any classic book on ANOVA will have information on this type of model. How you set up your data will depend on which software you use (e.g., in SPSS you need to use the MANOVA but in R and Stata you can use ANOVA procedures; the data structure will also differ). May 4 '18 at 14:29
• I just found one of the assumptions of ANOVA test is that the dependent variable should be measured at the continuous level. In my case, I'm gonna see how the participants did the test, as in compare how many right answers they have got (to check their concentration ability). Do you think the results will be valid for the ANOVA test? May 4 '18 at 14:39

First, you aren't seeing if the data are independent or not. You are seeing if the variables are independent. You know the data are not independent because you are testing the same people twice. I wrote a blog post about this.

Next, since you are really interested in two independent variables (presence of music and sex) I suggest that you use a multilevel model. Which type of MLM will depend on the characteristics of the dependent variable, but probably some sort of count model (unless there are a great many questions).

These models are complex; you may need to hire a consultant.

• Oh thank you! My dependent variable in this case was the participant's ability to concentrate. I had made a test with 10 different sentences which the participants had to read for about a minute in silence. afterwards I had a cued recall and MCQ test. the same test was done again, but this time with the presence of music. I'm quite not sure about how to exactly the MLM model here since I haven't actually heard about it before. Is there any alternative? May 4 '18 at 14:03
• I think MLM is the best approach. You may need to hire a consultant. May 4 '18 at 20:12