Psychology 311 - Introduction To Statistics Lab Manual: Diane Lane Washington State University Vancouver

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34
At a glance
Powered by AI
The manual provides guidance on using SPSS to conduct statistical analyses and covers topics such as frequency distributions, t-tests, ANOVA, correlation, and chi-square tests.

The manual covers topics such as frequency distributions and descriptive statistics, graphing, z-scores, t-tests, ANOVA, correlation and regression, and chi-square tests.

Students are expected to only include necessary output to support answers, exclude extraneous output, and clearly mark answers on the output. They may handwrite or type answers.

Psychology 311 Introduction to Statistics Lab Manual

Diane Lane Washington State University Vancouver

Table of Contents Getting Started ............................................................................................... Frequency Distributions and Descriptive Statistics ....................................... Graphing ........................................................................................................ Z-Scores ......................................................................................................... T-Tests ........................................................................................................... ANOVA ......................................................................................................... Correlation and Regression............................................................................ Chi-Square ..................................................................................................... Expectations for Completing Labs ................................................................ 3 9 13 15 17 21 24 28 34

Section 1 - Getting Started This manual will provide directions for the 10.1 version of SPSS, a statistical program. However, you may use the 7.5 student version to complete lab assignments. For our purposes, there are only minor differences between the two programs. Opening the Program Once your computer is on and you are in Windows, click one time on the Start button at the left-hand bottom corner of the screen. Go to Programs and click on it once. Select SPSS 10.1 from the list of programs by double clicking on it. SPSS will open to a blank datasheet:

You can immediately start putting data into the datasheet, or open a previously saved file.

Opening a Saved Data File Go to File at the top right-hand corner of your screen. Select Open, then select Data. From there, select the correct drive (A: from floppy; C: from hard drive), and either select the file from the list provided, or type in the file name. The saved data will open to the datasheet.

Entering Data to Datasheet Variables are listed in columns, not rows. There are two types of variables you can place into the datasheet: A. Raw scores - i.e., actual scores such as 145 for a persons weight. B. Categorical values - coded numerical values for categorical data. Ex: Freshman = 1 Sophomore = 2 Junior = 3 Senior = 4

Labeling Variables Variables are labeled by clicking one time on the Variable View tab at the bottom left-hand corner of the screen. This will bring you into a screen that summarizes information about each variable. Clicking on the variable of interest will highlight that variable (which should be listed as var00001, var00002, etc.). Once highlighted, change the variable name by typing in the desired name.

Label Variables

# of Decimals

Categorical Values

Coding Categorical Values Categorical values can be entered into the dataset. To identify the categorical values click one time on the Variable View tab at the bottom left-hand corner of the screen.

Once in the variable view screen click on the Values box that corresponds to the variable of interest.

This will open a Value Labels menu box, which allows a values to be assigned to numbers in each variable.

For example, in the Gender variable, 1 signifies a male subject, whereas 2 signifies a female subject. Therefore, type 1 for value, and male for value label. Then click add. After clicking add, the program immediately brings you back to the value field to allow labeling of another variable. Continue labeling for each value. When complete click on OK one time. You will then be brought back to the Variable View menu. To return to the datasheet click on the Data View tab one time.

Saving Data To save data, click one time on File in the top left-hand corner of the screen. Select Save. Select drive data will be saved to and type in a file name. The suffix for any SPSS dataset must be .sav - SPSS will not recognize a dataset without the suffix .sav. So for our data, if we wanted to call it stats, our file name would be: stats.sav Saving Output To save output, while in output screen, click one time on File and select Save. The suffix for any SPSS output must be .spo SPSS will not recognize an output without the suffix .spo. So for our output, if we wanted to call it stats, our file name would be: stats.spo Example Dataset This example dataset will be used throughout the manual to demonstrate how to use the SPSS program to complete various types of statistics. Student Name Jimmy Chris Susan Kay Peter Cindy Mary Patty Joanne Liz Renee Rob Mike Roger Sandy Steve John Bill Scott Nick M/F M M F F M F F F F F F M M M F M M M M M Year Freshman Senior Freshman Senior Freshman Junior Senior Junior Sophomore Sophomore Junior Sophomore Freshman Senior Freshman Junior Sophomore Junior Sophomore Freshman Weight 220 185 104 137 156 130 145 115 170 102 149 192 180 230 165 199 240 170 175 160 I.Q. 80 110 100 85 70 110 85 90 115 100 120 130 85 90 115 100 110 100 100 90 Pet Owner Yes No Yes Yes No Yes Yes No No No No No Yes No Yes Yes Yes No No No Stress Level 6 5 2 1 6 3 1 7 4 5 3 7 3 5 1 2 1 5 4 6

Dataset in SPSS:

You may view the dataset or output file at anytime by clicking on either the SPSS data button (after you name your dataset, the name will be displayed on this button - in this example, the dataset button was named statslab.) or the SPSS output button at the bottom of the screen.

Section 2 - Frequency Distributions and Descriptive Statistics Frequency Distribution To obtain a frequency distribution click one time on Analyze, go to Descriptive Statistics, then Frequencies.

From the Frequencies menu, place the variable of interest into the Variables box by clicking on the variable one time then clicking on the arrow key. (You may use one variable at a time, several variables, or all the variables. You will receive the statistics you select for each variable in the Variables box.)

Click on the Display Frequency Tables box to get a frequency table. This table will give you the variable values, its frequency, percentage, valid percentage, and cumulative percentage for each variable placed in the Variables box.

For example, if we placed weight into the Variables box, we would have an output like this:

Each weight entered into the dataset is listed in the far left column, with the frequency, percent and cumulative percent for each weight.

10

Measures of Central Tendency and Variance Click one time on Analyze, go to Descriptive Statistics, then Frequencies.

From the Frequencies menu, place the variables of interest into the Variables box. Click one time on the Statistics box at the bottom of the screen.

Once in the Statistics menu, select desired statistic by clicking on the box to the left of the desired statistic. Then click Continue, which will bring you back to the Frequencies menu. If done click O.K. Selected statistics will be generated in an output file.

11

OR Click one time on Analyze, go to Descriptive Statistics, then Descriptives.

From the Descriptives menu, place the variables of interest into the Variables box. Click on the Options box.

From the options menu select the wanted statistics, then click continue. Once back into the Descriptives menu, click OK to complete statistics

12

Section 3 - Graphing Bar Charts and Histograms Click one time on Analyze, go to Descriptive Statistics, then Frequencies.

Place the variables of interest into the Variables box. Click one time on the Charts button at the bottom of the screen.

Select Bar Chart or Histogram. Clicking on Continue will return to the Frequencies menu.

Selecting Chart Values: charts can be completed by frequencies (# of each value) or by percentages (percent of total for each value). Make sure to select the correct value depending upon the question asked.

13

Stem and Leaf Plots Click one time on Analyze, go to Descriptive Statistics, then Explore.

Place the variable(s) of interest into the Dependent List. Under Display box in left lower-hand corner select Plots. Then click one time on Plots button.

When Plots menu opens, select Stem-and-Leaf plot from choices. Then click Continue, followed by OK.

14

Section 4 Z-Scores Click one time on Analyze, go to Descriptive Statistics, then Descriptives.

Place variable(s) of interest into the Variables box. Then click on Save Standardized Values as Variables.

This will create a new variable that will be called zvariable (z before the name of the variable you choose). For example, if we chose weight as our variable, we will now have a new variable, zweight, IN OUR DATASET. Unlike most SPSS calculations, this one will be placed in the dataset, rather than an output file:

15

The reason that z-scores are placed into the dataset rather than an output file is that you may now use the z-scores, instead of the raw scores, for statistical calculations. This can come in handy if you need a standardized number to compare groups tested using different tests/measurement scales. To demonstrate that you have created this new variable, click one time on Analyze, go to Reports, then to Case Summaries.

When in the Case Summaries menu, place the variables of interest into the Variables box, then click OK (in this case zweight).

This will give you an output list of your variable in ascending order (NOT the order in your dataset). Here is an example of the output from zweight:

16

Section 5 T-Tests Single Sample T-Tests To obtain a single sample t-test, click one time on Analyze, go to Compare Means, then One-Sample T-Test.

From the one-sample t-test menu, place the variable(s) of interest into the Test Variable(s) box. Place the population mean to be tested into the Test Value box.

By clicking on the Options button, you may set your confidence interval level. The default level set by SPSS is 95%, and unless otherwise stated, this will also be the default for our class.

17

The output generated by the one-sample t-test will look like this:

1. 2. 3. 4.

Name of variable selected The actual t value calculated by SPSS The degrees of freedom for our t-test The alpha level of our t-test. This is the actual alpha level for our test. If our critical alpha is .05, then any value .05 or less in this box indicates a significant t value. If the alpha level is greater than .05, our t was not significant. 5. The confidence intervals for our test.

18

Independent Samples T-Test To obtain an independent samples t-test, click one time on Analyze, go to Compare Means, then Independent-Samples T-Test.

From the independent-samples t-test menu, place the dependent variable into the Test Variable(s) box. Place the independent variable into Grouping Variable box.

The independent variable has to be defined. For example, in our variable year, 1 = freshmen, 2 = sophomores, 3 = juniors, and 4 = seniors. Since this is a t-test, we can only compare two groups to one another. Therefore, if we were interested examining if there is a significant difference in weight between freshmen and sophomores we would click on the Define Groups button and input 1 for Group 1 and 2 for Group 2. However, if we were interested in freshmen vs. seniors, we would input 1 and 4.

Once groups are defined, click on the continue button and you will be returned to the independent-samples t-test menu.

19

At the independent-samples t-test menu, by clicking on the Options button, you may set your confidence interval level. The default level set by SPSS is 95%, and unless otherwise stated, this will also be the default for our class.

The output generated by the one-sample t-test will look like this:

1. Selected Variable. 2. Test for equal variances (assumption for t-test). Top line equal variance, bottom unequal variance. 3. If the alpha level in the Sig box is less than .05, it indicates that there is a significant difference in variances and therefore we should use the lower t value. However, if the Sig level is greater that .05 than the variances are equal and we can use the top t value (as in this example our t value is -.433 with a df = 9). 4. The t value calculated by SPSS. 5. The degrees of freedom for our t value. 6. Our alpha level (see above). 7. Confidence levels (see above).

20

Section 6 Analysis of Variance (ANOVA) One Factor ANOVA Click one time on Analyze, go to Compare Means and select One-Way ANOVA.

From the ANOVA menu, place the dependent variable into the Dependent List box. Place the independent variable into the Factor box (in our example we are examining if there are significant differences in weight between freshmen, sophomores, juniors and senior; therefore, weight is placed into the dependent list box and year is placed in the factor: box).

There are three boxes at the bottom of the ANOVA menu. Analysis of Variance only tells you that there is a significant difference between groups, but not which groups specifically. Contrasts allow you to look at differences between 2 groups and should be used if a priori contrasts were designed in the experiment. Post hoc comparisons do the same thing contrast do, however, are used when no specific contrasts were intended in the design of the experiment. The most common post hoc test is the Tukey Test.

21

The options button will allow for descriptive statistics for each of the groups and test for homogeneity of variance.

Select the options wanted, then click OK from the ANOVA menu. The output generated will look like:

This output should look familiar. It is essentially the same source table that is done by hand in class. The only exception is the last column. The is the actual alpha level for our F value. In this example, the alpha is = .802. Because it is greater than .05, our F value is not significant and we would fail to reject the null hypothesis.

22

More Complex Analyses More complex analyses will not be required in this class, however, you may need them in the future. To complete a factorial ANOVA or a repeated factors ANOVA click one time on Analyze, go to General Linear Model, then Univariate.

This will get you to the ANOVA menu. Place the dependent variable into the Dependent Variable box. The independent variable(s) go into the fixed factors box.

23

Section 7 Correlation and Regression Correlation Click one time on Analyze, go to Correlate, and select Bivariate.

Once in the Bivariate menu, place the variable of interest into the Variable(s) box. Two or more variable may be placed into this box. Make sure to select the Pearson Correlation Coefficient and select whether it is a one- or two-tailed test.

By clicking on the Options button, you can get means and standard deviations for each of your variables.

24

The correlation output will look like:

The output will contain the Pearson correlation (r value), the alpha value, and the number of subjects for each correlation. In this example, r = .067, with an alpha of .777. Not surprisingly, there is no significant correlation between a persons weight and their IQ.

25

Regression Click one time on Analyze, go to Regression, and select Linear.

From the linear regression menu, place the dependent variable (Y variable) in the Dependent box and the independent variable (X variable) in the Independent(s) box. Ignore the rest of the menu options.

26

The output will look like:

The coefficients box provides the slope and y-intercept necessary to create a regression equation. Predicted Y = slope * X + Y-intercept (Constant) B is the Y-intercept (in this example 165.377) The independent variables B = the slope (in this example Year B = .350) Y = (.350) (X) + 165.377

27

Section 8 Chi-Square No Preference Chi-Square Click one time on Analyze, go to Nonparametric Tests, and select Chi-Square.

In the Chi-Square menu, place the variable of interest into the Test Variable List box. Make sure All categories equal is selected.

To obtain descriptive statistics, click on the Options button and select Descriptives.

28

Chi-Square output from SPSS:

The chi-square value is .200 with an alpha value of .655, indicating there are no significant frequency differences between groups.

29

No Difference From Population Chi-Square Click one time on Analyze, go to Nonparametric Test, and select Chi-Square.

From the Chi-Square menu place the variable of interest into the Test Variable List box. The range of values possible should be entered in the Expected Range box. In this example, the total range possible is from 1 to 4. Next, select Values from the Expected Values box. Population frequency values must be entered for each categorical value. It is important that you enter the values in the same categorical order as is in the Expected Range box. For category 1 (freshmen), we have one freshman in our population, 2 sophomores, 8 juniors, and 10 seniors.

30

The Chi-Square output from SPSS:

43.61

The Chi-Square value is equal to 43.61 and the alpha is equal to .000, indicating a significant difference from the population.

31

Chi-Square Test for Independence Click one time on Analyze, go to Descriptive Statistics, and select Crosstab.

In the crosstabs menu place one variable in the Row(s) box and the second variable in the Columns box.

Click one time on the Statistics button at the bottom of the menu. In the statistics menu select Chi-Square

32

The Chi-Square output from SPSS:

The Chi-Square value equals 14.613, with an alpha of .023, indicating a significant difference between groups, or a significant correlation between owning a pet and the amount of stress experienced.

33

Expectations for Completing Labs By completing labs, you are conveying that you understand how to use SPSS to compute requested statistics. Thus, not only are you expected to include all necessary output to support your answer, you should also know what is NOT necessary and exclude any extraneous output. How will I know what is necessary? Any answer given in a lab assignment, unless otherwise specified, needs output to support the answer. If you have output that is not used in an answer, it is unnecessary and points will be taken off for unnecessary output. How do I get rid of unnecessary output? There are three ways to exclude unnecessary output in any assignment. 1. Make sure the only statistics selected are the requested statistics (i.e., the ones you want). Unfortunately, SPSS retains previous settings, and therefore, you may inadvertently get output you do not want. It is best to check that you not only select the statistics you DO want, but also click OFF those statistics you do not want. 2. If you complete the analyses and discover unnecessary calculations in the output, you can delete those calculations while in SPSS (before printing). Simply click once anywhere on the unwanted output. It will be highlighted, then hit the delete button on your keyboard. This will remove the selected output. Be sure to select only the output you want to delete, so you dont lose output you need to answer your lab questions. 3. If you have already printed out your output and notice unnecessary calculations, merely cross them out by hand and write unnecessary next to it, indicating that you are aware that this output is not needed to answer the question. Other Expectations All answers on the output must be clearly marked with the number of the question next to the appropriate calculation to indicate you understand where the answer came from. You may hand write written responses on the output pages, or double-click on the output and type answers in. Either method is acceptable. This manual contains information on using SPSS to calculate statistics. The lab assignments will not only require SPSS calculations, but also information from class about statistics to obtain a complete answer. In other words, you also need to know how to interpret the statistics and output that you receive from SPSS.

34

You might also like