# Correlation between a number of variables when having different conditions

I'm trying to investigate whether there is correlation between a number of variables when I have different conditions, and I need some help of identifying what method I should use. Let me give an example, as it's easier to understand. X subjects (females and males) took part in a study. They performed a search task using either a computer or a tablet device. I recorded some eye-tracking data (e.g., number of fixations, fixation duration, etc.) and I want to investigate whether there is a correlation between each eye-tracking data and the time required to perform the task. The participants were actually divided into four groups regarding their gender and the device they used:

 1. Female - Desktop (F-D)
2. Female - Tablet (F-T)
3. Male - Desktop (M-D)
4. Male - Tablet (M-T)


So, how what should I do to investigate the correlation between the eye-tracking data (ET1, ET2, ... ETn) and the task completion time (T), across:

1. across all participants,
2. across gender (M or F),
3. across device used (D or T),
4. across each sub-group (F-D, F-T, M-D, M-T).

For eye tracking among all participants:

Simply use Pearson correlation or Spearman rank-order correlation. I.e. use your eye-tracking numerical scores and your numeric time scores in seconds or minutes and find the correlation between them. You can get all the correlations for every ET variable you have and see which ones explain the most variance in time spent on the task. Using a factor analysis or PCA would help flesh out which explanatory variables were correlated with each other. That way you could narrow your focus onto a few key ET variables.

Across gender:

Break the data into subgroups based on gender and do the same as above. If you want to find differences across genders, then you could simply do t-tests across genders based on the time it took to complete the tasks.

You could also make this an ANCOVA situation. That is, you plot on the x-axis the ET variable you are interested in. You plot on the y-axis the time it took to complete the task. Then you plot two regression lines through the data. One for the males and one for the females. If the slopes are the same, you know that gender is not interacting with the study. If the slopes are different, you know males respond differently than females.

Also consider plotting an interaction plot.

Time is on the Y axis. Male and Female are on the X-axis. Then the tree lines would be your 3 ET variables. The left most point of one line is the mean for males and the rightmost point of the line is the mean for females.

For device:

Do the same as above but instead of splitting by gender split by device. Find correlations between the time and all the ET measures based on subsets grouped by device.

For device and gender:

More subsets of the data. Do the same as above. Is there a higher correlation among males who use tablets between the ETn score and time vs females who use desktops with the ETn score and time?