I would like to test the relationship between two variables based on the level of a third variable. What kind of statistical tests can investigate this relationship? Can a normal Pearson Correlation do it?
Ahmed, you might read something about partial correlation coefficient and part correlation. Kerlinger and Pedhazur have a very clear presentation in their book "Multiple Regression y Behavioral Research, Holt, Rinehart and Winston, 1973", pages 83-...
Jorge Ortiz Pinilla partial correlation is mainly used to exclude the effect of a variable, when testing the relationship between another two variables. What I need is test the effect of a variable on the relationship between another two variables.
Ahmed, if you say what software you use, others can likely point to specific resources to help you specify and interpret your model. E.g., the UCLA website has many good resources for users of the major stats packages. HTH.
Really it is not a regression like ANCOVA which is a one-way effect of the explanatory variables on the response variable (the random variable). A correlation is a two-way symmetrical relationship - both are random variables and in a sense both are responses. In this case it is the mutual response between the correlated variable as a function of the third.
An alternative would be to do a MANOVA regression analysis in which the response variables are the two random variables whose relationship you are interested against the levels of the explanatory variable (the third variable).
But really I think the best description of the model you need is a partial correlation which is basically an analysis of the correlation itself stratified by the third variable.