Comparing Two Variables PS 225 Lecture 16 Comparing Two Variables
Studying Combinations of Variables Independent variable – variable believed to cause changes in the dependent variable Dependent variable- variable believed to reflect changes caused by the independent variable
Example Example: Colder temperatures may cause changes in the amount of ice formed. Temperature is the independent variable Amount of ice is the dependent variable
Comparing Data More than one piece of information about each subject in the study Plotted in a table with columns representing one variable and rows representing the other variable Contents of the cells may be the frequency, percentage or mean of values you are interested in
Cross Tabulation
Chi-Squared Test Test for independence Can be used for nominal data Nonparametric test
Crosstabulation Independent Variable Dependent Variable
Crosstabulation Counts
Crosstabulation Percentages
Crosstabulation Marginal Totals
Crosstabulation Formulas Marginal frequencies Sum of all frequencies in column Sum of all frequencies in row Percentages (Frequency in Cell)/(Frequency for Column) *100 Marginal Percentages Row = (Frequency in Row)/(Total Frequency)*100 Column = Sum of Percentages in Column
Chi-Squared Statistic
SPSS Assignment Consider the actual GSS data on Gender and Political Party Create a crosstabulation comparing the two variables with gender as the independent variable and political party as the dependent variable Answer the question: Does there appear to be any relationship between gender and political party affiliation? What is the relationship between gender and political party affiliation?