cmeri ppt binomial nonparametric

120
CORRELATION Partial Correlation To perform Partial Correlation Analysis, we can use the employeedata.sav ” file. From the file we can estimate the correlation between current salary (salary) and beginning salary (salbegin), while choosing the control variable as months since hire (jobtime) and previous experience (prevexp). The order of the partial correlation coefficient is determined based on the number of control variables.

Upload: dipnis

Post on 05-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 1/120

CORRELATIONPartial Correlation

• To perform Partial Correlation Analysis, we can use the

“employeedata.sav” file. From the file we can estimate the

correlation between current salary (salary) and beginning salary(salbegin), while choosing the control variable as months since hire

(jobtime) and previous experience (prevexp). The order of the partialcorrelation coefficient is determined based on the number of controlvariables.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 2/120

REGRESSION

• Linear Regression estimates the coefficients of the linear equation.To analyze the relationship between variables we select the file

“employeedata.sav”. We will analyze the relationship

between the current salary as the dependent variable and

education level, previous experience , beginning salary andmonths since hire as the independent variables.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 3/120

LOGISTIC REGRESSION

• To discuss the procedure for conducting LogisticRegression, we would use the sample file

“employeedata.sav”. The analysis uses as a

dependent the attitude variable minority, which is coded0=no, 1=yes. The independent variables are years of education (educ), months of experience (prevexp),

 jobcategory (jobcat) ( 1=clerical, 2= custodial, 3=managerial), and gender (m,f)

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 4/120

LOGISTIC REGRESSION-1

• Logistic regression is useful for situations inwhich you want to be able to predict thepresence or absence of a characteristic or outcome based on values of a set of predictor 

variables. It is similar to a linear regressionmodel but is suited to models where thedependent variable is dichotomous. Logisticregression coefficients can be used to estimateodds ratios for each of the independent

variables in the model. Logistic regression isapplicable to a broader range of researchsituations than discriminant analysis.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 5/120

LOGISTIC REGRESSION-2

• Statistics. For each analysis: total cases, selected cases,valid cases. For each categorical variable: parameter coding. For each step: variable(s) entered or removed,iteration history, -2 log-likelihood, goodness of fit,Hosmer-Lemeshow goodness-of-fit statistic, model chi-

square, improvement chi-square, classification table,correlations between variables, observed groups andpredicted probabilities chart, residual chi-square. For each variable in the equation: coefficient (B), standarderror of B, Wald statistic, R, estimated odds ratio

(exp(B)), confidence interval for exp(B), log-likelihood if term removed from model. For each variable not in theequation: score statistic, R. For each case: observedgroup, predicted probability, predicted group, residual,standardized residual.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 6/120

LOGISTIC REGRESSION-3

• Data. The dependent variable should be dichotomous. Independent variables can beinterval level or categorical; if categorical, they should be dummy or indicator coded(there is an option in the procedure to recode categorical variables automatically).

•  Assumptions. Logistic regression does not rely on distributional assumptions in thesame sense that discriminant analysis does. However, your solution may be morestable if your predictors have a multivariate normal distribution. Additionally, as withother forms of regression, multicollinearity among the predictors can lead to biased

estimates and inflated standard errors. The procedure is most effective when groupmembership is a truly categorical variable; if group membership is based on values of a continuous variable (for example, "high IQ" versus "low IQ"), you should consider using linear regression to take advantage of the richer information offered by thecontinuous variable itself.

• Related procedures. Use the Scatterplot procedure to screen your data for multicollinearity. If assumptions of multivariate normality and equal variance-

covariance matrices are met, you may be able to get a quicker solution using theDiscriminant Analysis procedure. If all of your predictor variables are categorical, youcan also use the Loglinear procedure. If your dependent variable is continuous, usethe Linear Regression procedure. You can use the ROC Curve procedure to plotprobabilities saved with the Logistic Regression procedure.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 7/120

LOGISTIC REGRESSION-4

• To Obtain a Logistic Regression Analysis

• From the menus choose:

•  Analyze• Regression

• Binary Logistic...

• Select one dichotomous dependent variable. This variable may be numeric or shortstring.

• Select one or more covariates. To include interaction terms, select all of thevariables involved in the interaction and then select >a*b>.

• To enter variables in groups (blocks), select the covariates for a block, and click Nextto specify a new block. Repeat until all blocks have been specified.• Optionally, you can select cases for analysis. Click Select, choose a selection

variable, and click Rule.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 8/120

NONPARAMETRIC TESTS

•  A number of nonparametric tests are available,including:

• The Chi-Square Test • The Binomial Test • The Runs Test • The One-Sample Kolmogorov-Smirnov Test • Two-Independent-Samples Tests 

• Tests for Several Independent Samples • Two-Related-Samples Tests • Tests for Several Related Samples 

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 9/120

NONPARAMETRIC CHI-SQUARE

• The Chi-Square Test procedure tabulates avariable into categories and tests the hypothesisthat the observed frequencies do not differ fromtheir expected values.

• Chi-Square Test allows you to:

• Include all categories of the test variable, or limitthe test to a specific range.

• Use standard or customized expected values.• Obtain descriptive statistics and/or quartiles on

the test variable.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 10/120

Testing Independence

• A large hospital schedules discharge supportstaff assuming that patients leave the hospital ata fairly constant rate throughout the week.

However, because of increasing complaints of staff shortages, the hospital administration wantsto determine whether the number of dischargesvaries by the day of the week.

• This example uses the file dischargedata.sav .Use Chi-Square Test to test the assumption thatpatients leave the hospital at a constant rate.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 11/120

CHI-SQUARE

• Each case is a day of the week, and toperform the chi-square test, you must firstweight the cases by frequency of patient

discharge.

• To weight the cases, from the Data Editor menus choose:

• DataWeight Cases...

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 12/120

CHI-SQUARE

• Select Weight cases by.

• ► Select Average Daily Discharges as thefrequency variable.

• ► Click OK.

• The cases are now weighted by frequency

of patient discharge.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 13/120

CHI-SQUARE

• To begin the analysis, from the menuschoose:

• AnalyzeNonparametric TestsChi-Square...

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 14/120

CHI-SQUARE

• Select Day of the Week as the testvariable.

• ► Click OK.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 15/120

Testing a Specific Range

• By default, the Chi-Square Test procedure buildsfrequencies and calculates an expected valuebased on all valid values of the test variable.However, you might want to restrict the range of the test to a contiguous subset of the availablevalues. As the next example shows, theprocedure easily allows for this.

• The hospital requests a follow-up analysis: Canstaff be scheduled assuming that patientsdischarged on weekdays only (Monday throughFriday) leave at a constant daily rate?

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 16/120

Rerunning the analysis

• To rerun the analysis, recall the Chi-Square Test dialog box.

• ► Select Use specified range.

• ► Type 2 as the lower value and 6 as theupper value.

• ► Click OK.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 17/120

Summary

• Using the Chi-Square Test procedure, you foundthat the rate at which patients are dischargedfrom the hospital is not constant over the courseof an average week. This is largely due togreater numbers of discharges on Friday andvastly fewer numbers of discharges on Sunday.When you restricted the range of the test toweekdays, the discharge rates appeared to be

more uniform. You may be able to correct staff shortages by adopting separate weekday andweekend staff schedules.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 18/120

Related Procedures

• The Chi-Square Test procedure is useful when you wantto compare a single sample from a polychotomousvariable to an expected set of values. The proceduretabulates this variable into a set of frequencies and tests

this observed set against either a common expectedvalue or a customized set of expected values. The entirerange of the test variable is used by default; however, itsrange may be restricted to any set of contiguous values.

 Additionally, descriptive statistics and/or quartiles can be

requested.• If your variable has only two outcomes, you can

alternatively use the Binomial Test procedure.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 19/120

Binomial Test Procedure

• The Binomial Test procedure compares an observedproportion of cases to the proportion expected under abinomial distribution with a specified probabilityparameter. The observed proportion is defined either by

the number of cases having the first value of adichotomous variable or by the number of cases at or below a given cut point on a scale variable. By default,the probability parameter for both groups is 0.5, althoughthis may be changed. To change the probability, you

enter a test proportion for the first group. The probabilityfor the second group is equal to 1 minus the probabilityfor the first group. Additionally, descriptive statisticsand/or quartiles for the test variable may be displayed.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 20/120

Comparing Several Distribution

•  A telecommunications firm loses about 27% of its customers to churn each month. In order toproperly focus churn reduction efforts,

management wants to know if this percentagevaries across predefined customer groups.

• This information is collected in the file telco.sav .Use the binomial test to determine whether a

single rate of churn adequately describes thefour major customer types.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 21/120

Preparing the Data

• In order to perform the test, you must firstsplit the file by Customer category.

• ► To split the file, from the Data Editor menus choose:

• DataSplit File...

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 22/120

Preparing the Data

• Select Compare groups.

• ► Select Customer category as thevariable on which to base groups.

• ► Click OK.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 23/120

Running the analysis

• To begin the analysis, from the menuschoose:

• AnalyzeNonparametric TestsBinomial...

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 24/120

Running the analysis

• Select Churn within last month as the testvariable.

• ► Type 0.27 as the test proportion.

• Click Options.

• Select Descriptive.

• ► Click Continue.• ► Click OK in the Binomial Test dialog

box.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 25/120

Descriptive Statistics Table

• Because Churn within last month is adichotomous variable, the mean tells usthe proportion of churn within each

customer type. Multiplying theseproportions by 100 expresses the samedata as percentages.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 26/120

Contd….. 

• For example, the percentage of churn for customers subscribing only to basicservice was 31%

• Similarly, customers who prefer morehigh-end electronic services churned at arate of about 27% within the last month.Similarly, customers who prefer morehigh-end electronic services churned at arate of about 27% within the last month.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 27/120

Contd…. 

• There are about 280 customers who subscribeto a set of convenience services (three-waycalling, call forwarding, call waiting, etc.). Of 

these, only 16% recently churned.• Customers who take advantage of all of the

services offered by the firm churned the most--37%, or 10% higher than the average of all

customers within the last month.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 28/120

Binomial test Table

• Each panel of the binomial test tabledisplays one binomial test. For example,the first panel displays the test of the null

hypothesis that the proportion of churn for Basic service users is the same as theproportion of churn in the total sample.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 29/120

Contd…. 

• Of the 266 Basic service customers, 83churned within the last month. TheObserved Prop. column here shows that

these 83 customers account for 31% of the total Basic service group in this sample

• The test proportion of 0.27 suggests thatwe should expect 0.27 * 266, or about 72customers, to have churned.

•  

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 30/120

Contd…. 

• The asymptotic significance value is 0.07, whichis above the conventional cutoff for statisticalsignificance (0.05). By that standard, you cannotreject the null hypothesis that the churn rate for 

basic service customers is equal to the churnrate in the sample at large.

• The same cannot be said for Plus servicecustomers, however. In this case, the proportion,0.16, is significantly lower than the testproportion. Many fewer Plus service customersfound another service provider last month.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 31/120

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 32/120

Using a Cut Point to Define theSamples

•  As part of a continuing analysis of churn in their customer base, a telecommunications firmquestions whether those who churn tend to be

above or below the median household income of $47,000.

• This example uses the file telco.sav . Use theBinomial Test procedure to dynamically compute

and test the proportion of each churn groupfalling below the median value.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 33/120

Preparing the Data

• In order to perform the test, you must firstsplit the file by Churn within last month.

• ► To split the file, from the Data Editor menus choose:

• DataSplit File...

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 34/120

Preparing the Data

• Click Reset to restore the default settings.

• ► Select Compare groups.

• ► Select Churn within last month as thevariable to base groups on.

• ► Click OK.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 35/120

Running the Analysis

• To begin the analysis, from the menuschoose:

• AnalyzeNonparametric TestsBinomial...

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 36/120

Running the Analysis

• Click Reset to restore the default settings.

• ► Select Household income in thousands as thetest variable.

• ► Type 47 as the cut point to define thedichotomy

• Click Options

• Select Quartiles.• ► Click Continue.

• ► Click OK in the Binomial Test dialog box.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 37/120

Income Quartiles by Churn Group

• The descriptives table displays thequartiles for each churn group. Generally,customers who churned last month have

lower household incomes.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 38/120

Binomial Test Table by ChurnGroup

• The binomial test table is split by the values of Churn within last month. The first test selectsonly those customers in the sample who did not

churn last month.• Within this first split file group, the cut point has

created two groups. The first group consists of those customers who did not churn and whose

household income is less than or equal to themedian for the total sample.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 39/120

Binomial Test Table by ChurnGroup

• In these data, just about half of those who didnot churn fall at or below median income. As wewould expect, the difference in proportions is notsignificant.

• However, of those 274 customers who churnedlast month, the proportion with householdincomes at or below the median is significantlydifferent from the null hypothesis value. Thosewho churn tend to be the less affluentcustomers.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 40/120

Summary

• Using a cut point to define the groups, youhave found that a majority of thecustomers who churned within the last

month fall below the median householdincome. Now that these customers havebeen identified as high-risk, you can focus

further efforts on determining why thesecustomers are dissatisfied.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 41/120

Related Procedure

• The Binomial Test procedure is useful when youwant to compare a single sample from adichotomous variable to an expected proportion.If the dichotomy does not exist in the data as a

variable, one can be dynamically created basedupon a cut point on a scale variable.

• If your variable has more than two outcomes, trythe Chi-Square Test procedure.

• If you want to compare two dichotomousvariables, try the McNemar test in the Two-Related-Samples Tests procedure.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 42/120

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 43/120

Examining Usability Test Results

•  An e-commerce firm enlisted beta testers tobrowse and then rate their new Web site.Ratings were recorded as soon as each tester 

finished browsing. The team is concerned thatratings may be related to the amount of timespent browsing.

• The ratings are collected in the file

siteratings.sav . Use the Runs Test to test thehypothesis that time spent browsing is correlatedwith site rating.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 44/120

Determining a Cut Point

•  A bar chart will help determine the optimal cutpoint.

• ► To create the chart, from the menus choose:

• GraphsBar...

Select Simple, and then click Define

• Select Web Site Rating as the category axis.

• ► Click OK.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 45/120

Bar Chart of the Test Variable

• The scale for Web Site Rating theoreticallyranges from 0 to 20, where 0 = highly unusableand 20 = highly usable. The actual range of scores is narrower, dispersing from a low of 6 to

a high of 14.• Those on the team who believe that the rating

scale is ordinal have argued to use the mode, or most frequently occurring score, as the cut point.

However, the bar chart shows that thedistribution of ratings is bimodal, with one modeat 8 and the second at 12.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 46/120

Bar Chart of the Test Variable

• Others have argued that the ratings shouldprobably be considered a scale variableand that the median would be a useful cut

point. After some discussion, the teamdecides that randomness will be testedwith respect to all three cut points: the

median and both modes

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 47/120

Testing Multiple Cut Points

• To begin the analysis, from the menuschoose:

• AnalyzeNonparametric TestsRuns...

• Select Web Site Rating as the test variable

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 48/120

Testing Multiple Cut Points

• The median is selected by default, soselect Mode as a second cut point. Notethat the higher of the two modes (12) will

be used as the cut point for this test.Finally, select Custom, and type 8 as thethird cut point value to test.

• Click Options.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 49/120

Testing Multiple Cut Points

• Select Descriptive and Quartiles.

• ► Click Continue.

• ► Click OK in the Runs Test dialog box.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 50/120

Descriptive Statistics Table

• The statistics table will help you understandmore about the distribution of ratings in thesedata. While the default table is very wide, youcan easily pivot it to column format.

• ► Double-click the table to activate it. From theViewer menus choose:• Pivot

Transpose Rows and Columns

• 32 beta testers completed the task andsubmitted ratings.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 51/120

Descriptive Statistics Table

•  At 9.94, the average rating is almost exactly atthe center of the scale.

• The standard deviation is most useful as anindex of variability in normal distributions.However, the runs test does not make anyassumptions about normality, and we know fromthe bar chart that the distribution of ratings is notnormal.

• As we observed in the bar chart, the actualratings ranged from a low of 6 to a high of 14.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 52/120

Descriptive Statistics Table

• The quartiles tell us that about half of thesample rated the Web site in the range 8to 12. The median (10) is almost identical

to the mean. Although the distribution of ratings is bimodal and not normal, it is alsofairly symmetric.

Runs Test Table with a Median Cut

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 53/120

Runs Test Table with a Median CutPoint

• The test value is used as a cut point todichotomize the sample. In this table, thecut point is the sample median.

• Of 32 testers, 14 scored below themedian. Think of them as the "negative"cases

• The remaining 18 testers scored at or above the median. Think of them as the"positive" cases.

Runs Test Table with a Median Cut

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 54/120

Runs Test Table with a Median CutPoint

• The next statistic is a count of the observed runsin the test variable. A run is defined as asequence of cases on the same side of the cut

point.• For example, looking at the data, you observe

that the first four cases are below the median.This sequence of four "negatives" is the first run.

The second run begins at case 5, whose Website rating is equal to the median

Runs Test Table with a Median Cut

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 55/120

Runs Test Table with a Median CutPoint

• The third run begins at case 6, which isagain below the median. Countingcontinues in the same way across all 32

cases in the file.• If the order of the ratings is purely random

with respect to the median value, youwould expect about 17 runs across these

32 cases. Because you observed only 10runs, the Z statistic is negative.

Runs Test Table with a Median Cut

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 56/120

Runs Test Table with a Median CutPoint

• The 2-tailed significance value is theprobability of obtaining a Z statistic as or more extreme (in absolute value) than the

obtained value, if the order of ratingsabove and below the median is purelyrandom

Runs Test Table with a Modal Cut

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 57/120

Runs Test Table with a Modal CutPoint

• In this second test table, the cut point is themode. Remember that the distribution of ratingsis actually bimodal

•  A footnote warns you that the mode being usedis the larger of the two data values.

• The number of cases above and below this cutpoint stands in contrast to the previous table.Ratings below 12 outnumber those at or above12 by more than a 2 to 1 margin. This is notsurprising, given that 12 is also the 75thpercentile

Runs Test Table with a Modal Cut

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 58/120

Runs Test Table with a Modal CutPoint

• Because it is a function of the number of positiveand negative cases, the expected number of runs always depends on the cut point. In this

table, the expected number of runs is about 15,which is very close to the observed number.

• The 2-tailed significance value does not allowyou to reject the null hypothesis that the order of 

the ratings is random with respect to the higher modal value of 12.

Runs Test Table with a Custom Cut

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 59/120

Runs Test Table with a Custom CutPoint

• The third cut point is the custom value of 8.Recall that this test value is actually the first of the two modes of the distribution. There are 11

observed runs with this cut point. The Z value is0, indicating that 11 runs were expected bychance alone.

•  As with a mode of 12, we cannot reject the null

hypothesis that the order of the ratings aboveand below the modal value of 8 is random.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 60/120

Summary

• These test tables demonstrate that the results of theruns test may depend on your choice of cut point. In thisexample, the order of the ratings with respect to themedian is not random. On the other hand, the sameratings do not show any order with respect to either modal value. Using the runs test, you discovered thatwhether the test finds that ratings are related to timespent browsing depends on the cut point.

• Given that the test variable is composed of integer 

ratings data from 0 to 20, it's probably safe to treat thesite ratings as ordinal. Thus, the results of the two"mode" tests stand, and you can proceed as though theusability scores are independent of time spent browsing.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 61/120

Related Procedure

• You should use the Runs Test procedure when you want to test thehypothesis that the values of a variable are ordered randomly withrespect to a cut point of your choosing. The default cut point is themedian; however, you can also select the mean, the mode, or evena custom value. Optionally, you can request descriptive statisticsand/or quartiles of the test variable.

• The Runs Test is often used as a precursor to running tests thatcompare the means of two or more groups, including:• The Independent-Samples T Test procedure.• The One-Way ANOVA procedure.• The Two-Independent-Samples Tests procedure.• The Tests for Several Independent Samples procedure.

One Sample Kolmogorov Smirnov

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 62/120

One-Sample Kolmogorov-SmirnovProcedure

• The One-Sample Kolmogorov-Smirnovprocedure is used to test the null hypothesis thata sample comes from a particular distribution. Itdoes this by finding the largest difference (in

absolute value) between two cumulativedistribution functions (CDFs)--one computeddirectly from the data; the other, frommathematical theory. Four theoreticaldistribution functions are available-- normal,

uniform, Poisson, and exponential. Optionally,descriptive statistics and/or quartiles of the testvariable can be displayed.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 63/120

 Assessing Goodness of Fit

•  An insurance analyst wants to model thenumber of automobile accidents per driver.She has randomly sampled data on

drivers in a certain region and uses theKolmogorov-Smirnov test to confirm thatthe number of accidents follows a Poissondistribution.

• This example uses the fileautoaccidents.sav .

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 64/120

Running the Analysis

• To begin the analysis, from the menus choose:

• AnalyzeNonparametric Tests

1-Sample K-S...Select Number of accidents past 5 years as thetest variable.

• ► Deselect Normal, and select Poisson as the

test distribution.

• ► Click OK.

One-Sample Kolmogorov-Smirnov

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 65/120

One-Sample Kolmogorov-SmirnovTest Table

• The distribution is based on data from 500randomly sampled drivers. The samplesize figures into the test statistic below.

• The Poisson distribution is indexed byonly one parameter--the mean. Thissample of drivers averaged about 1.72

accidents over the past five years.

One-Sample Kolmogorov-Smirnov

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 66/120

One-Sample Kolmogorov-SmirnovTest Table

• The next three rows fall under the generalcategory Most Extreme Differences. Thedifferences referred to are the largest positive

and negative points of divergence between theempirical and theoretical CDFs.

• The first difference value, labeled Absolute, isthe absolute value of the larger of the two

difference values printed directly below it. Thisvalue will be required to calculate the teststatistic

One-Sample Kolmogorov-Smirnov

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 67/120

One-Sample Kolmogorov-SmirnovTest Table

• The Positive difference is the point atwhich the empirical CDF exceeds thetheoretical CDF by the greatest amount.

•  At the opposite end of the continuum, theNegative difference is the point at whichthe theoretical CDF exceeds the empirical

CDF by the greatest amount.

One-Sample Kolmogorov-Smirnov

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 68/120

One-Sample Kolmogorov-SmirnovTest Table

• The Z test statistic is the product of the squareroot of the sample size and the largest absolutedifference between the empirical and theoretical

CDFs.• Unlike much statistical testing, a significantresult here is bad news. The probability of the Zstatistic is below 0.05, meaning that the Poisson

distribution with a parameter of 1.72 is not agood fit for the number of accidents within thepast five years in this sample of drivers.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 69/120

Goodness of Fit within Groups

• Generally, a significant Kolmogorov-Smirnov test means one of twothings--either the theoretical distribution is not appropriate, or anincorrect parameter was used to generate that distribution. Lookingat the previous results, it is hard for the analyst to believe that thePoisson distribution is not the appropriate one to use for modelingautomobile accidents. Poisson is often used to model rare events

and, fortunately, automobile accidents are relatively rare.• The analyst wonders if gender may be confounding the test. Thetotal sample average assumes that males and females have equalnumbers of accidents, but this is probably not true. She will split thesample by gender, using each gender's average as the Poissonparameter in separate tests.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 70/120

Splitting the File

• To split the file, from the Data Editor menus choose:

• Data

Split file...

• Select Compare groups.

• ► Select Sex of insured as the testvariable.

• ► Click OK.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 71/120

Running the Analysis

• To rerun the one-sample K-S test, recall theOne-Sample Kolmogorov-Smirnov Text dialogbox.

•  Although the dialog box need not be reset, the

analyst would like to obtain descriptive statisticson the test variable within each group.• ► Click Options.• Select Descriptive.

• ► Click Continue.• ► Click OK in the One-Sample Kolmogorov-

Smirnov Test dialog box.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 72/120

Descriptive Statistics by Group

• The statistics table provides evidence thata single Poisson parameter for bothgenders may not be correct. Males in this

sample averaged about two accidentsover the past five years, while femalestended to have fewer accidents.

T T bl b G

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 73/120

Test Tables by Group

• When assessing goodness of fit,remember that a statistically significant Zstatistic means that the chosen distribution

does not fit the data well. Unlike theprevious test, however, we see a muchbetter fit when splitting the file by gender.

T t T bl b G

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 74/120

Test Tables by Group

• Increasing the Poisson parameter from1.72 to 1.98 clearly provides a better fit tothe accident data for men

• Similarly, decreasing the Poissonparameter from 1.72 to 1.47 provides abetter fit to the accident data for women.

SUMMARY

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 75/120

SUMMARY

• Using the One-Sample Kolmogorov-SmirnovTest procedure, you found that, overall, thenumber of automobile accidents per driver donot follow a Poisson distribution. However, once

you split the file on gender, the distributions of accidents for males and females can individuallybe considered Poisson.

• These results demonstrate that the one-sample

Kolmogorov-Smirnov test requires not only thatyou choose the appropriate distribution but theappropriate parameter (s) for it as well.

R l t d P d

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 76/120

Related Procedures

• You can use the one-sample Kolmogorov-Smirnovprocedure to test the null hypothesis that a samplecomes from a particular distribution. Four theoreticaldistribution functions are available--normal, uniform,Poisson, and exponential. Optionally, you can requestdescriptive statistics and/or quartiles of the test variable.

• If you want to compare the distributions of two variables,use the two-sample Kolmogorov-Smirnov test in theTwo-Independent-Samples Tests procedure.

• If your variable is scale, more statistics and tests of normality are available through the Explore procedure.

Nonparametric Tests for Two

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 77/120

Nonparametric Tests for TwoIndependent Samples

• The nonparametric tests for twoindependent samples are useful for determining whether or not the values of a

particular variable differ between twogroups. This is especially true when theassumptions of the t test are not met.

Methods for Two Independent

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 78/120

Methods for Two IndependentSamples

• When you want to test for differences between two groups, the independent-samplest test comes naturally to mind. However, despite its simplicity, power, and robustness,the independent-samples t test is invalid when certain critical assumptions are notmet. These assumptions center around the parameters of the test variable (in thiscase, the mean and variance) and the distribution of the variable itself.

• Most important, the t test assumes that the sample mean is a valid measure of center. While the mean is valid when the distance between all scale values is equal,it's a problem when your test variable is ordinal because in ordinal scales the

distances between the values are arbitrary. Furthermore, because the variance iscalculated using squared distances from the mean, it too is invalid if those distancesare arbitrary. Finally, even if the mean is a valid measure of center, the distribution of the test variable may be so non-normal that it makes you suspicious of any test thatassumes normality.

• If any of these circumstances is true for your analysis, you should consider using thenonparametric procedures designed to test for the significance of the differencebetween two groups. They are called nonparametric because they make no

assumptions about the parameters of a distribution, nor do they assume that anyparticular distribution is being used. Two popular nonparametric tests of location (or central tendency)--the Mann-Whitney and Wilcoxon tests--and a test of location andshape--the two-sample Kolmogorov-Smirnov test--are illustrated.

Methods for Two Independent

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 79/120

Methods for Two IndependentSamples

• Mann-Whitney and Wilcoxon tests. You can use the Mann-Whitneyand Wilcoxon statistics to test the null hypothesis that twoindependent samples come from the same population. Their advantage over the independent-samples t test is that Mann-Whitney and Wilcoxon do not assume normality and can be used totest ordinal variables.

• Two-sample Kolmogorov-Smirnov test. Alternatively, you can usethe two-sample Kolmogorov-Smirnov test to test the null hypothesisthat two samples have the same distribution. The test variable isassumed to be continuous; however, its cumulative distributionfunction (CDF) can assume any shape at all.

• In addition to their standard output, the Mann-Whitney and Wilcoxonand the two-sample Kolmogorov-Smirnov tests display descriptivestatistics and/or quartiles of the test variable.

Using the Mann-Whitney Test to

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 80/120

Using the Mann Whitney Test toTest Ordinal Outcomes

• Physicians randomly assigned female strokepatients to receive only physical therapy or physical therapy combined with emotionaltherapy. Three months after the treatments, theMann-Whitney test is used to compare eachgroup's ability to perform common activities of daily life.

• The results are collected in the file adl.sav . Usethe Mann-Whitney test to determine whether thetwo groups' abilities differ.

R i th A l i

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 81/120

Running the Analysis

• To begin the analysis, from the menus choose:• Analyze

Nonparametric Tests2 Independent Samples

• Select Travel ADL, Cooking ADL, andHousekeeping ADL as the test variables.

• Select Treatment group as the groupingvariable.

• ► Click Define Groups

•  

R i th A l i

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 82/120

Running the Analysis

• Type 0 as the group 1 value and 1 as thegroup 2 value.

• ► Click Continue.

• ► Click OK in the Two-Independent-Samples Tests dialog box.

R k T bl

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 83/120

Rank Table

• Because the test variables are assumed tobe ordinal, the Mann-Whitney andWilcoxon tests are based on ranks of the

original values and not on the valuesthemselves.

• The rank table is divided into three panels,

one panel for each test variable

R k T bl

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 84/120

Rank Table

• The first test variable, Travel ADL, measures theability to regularly get around the community. Itranges from 0 to 4, where 0 = Same as beforeillness and 4 = Bedridden. All 46 women in the

control group and all 54 women in the treatmentgroup provided valid data for this variable.

• First, each case is ranked without regard togroup membership. Cases tied on a particular 

value receive the average rank for that value. After ranking the cases, the ranks are summedwithin groups.

Rank Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 85/120

Rank Table

•  Average ranks adjust for differences in thenumber of patients in both groups. If the groupsare only randomly different, the average ranksshould be about equal. For Travel ADL, theaverage ranks are over 9 points apart.

• The test variables Cooking ADL andHousekeeping ADL contain missing data. For 

these variables, the value 4 = Never did any;thus, these scales do not apply to all patients.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 86/120

• However, for those to whom they do apply,there are differences of about 12 to 13points between the average ranks of the

treatment and control groups.

Mann-Whitney and Wilcoxon Tests

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 87/120

yTable

• The U statistic is simple (but tedious) tocalculate. For each case in group 1, the number of cases in group 2 with higher ranks is counted.Tied ranks count as 1/2. This process isrepeated for group 2. The Mann-Whitney Ustatistic displayed in the table is the smaller of these two values

• The Wilcoxon W statistic is simply the smaller of the two rank sums displayed for each group in

the rank table. The values displayed here arethe rank sums for the treatment group.•  

Mann-Whitney and Wilcoxon Tests

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 88/120

yTable

•  A nice feature of the Mann-Whitney andWilcoxon tests is that the Z statistic and normaldistribution provide an excellent approximationas the sample size grows beyond 10 in either 

group. The negative Z statistics indicate that therank sums are lower than their expected values.Each two-tailed significance value estimates theprobability of obtaining a Z statistic as or more

extreme (in absolute value) as the onedisplayed, if there truly is no effect of thetreatment.

Mann-Whitney and Wilcoxon Tests

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 89/120

yTable

• The significantly lower rank sums of thetreatment group indicate to the physiciansthat the additional emotional therapy had

some beneficial effect on such activities of daily life as cooking and cleaning.

Using the Two-Sample Kolmogorov-Smirnov Test to

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 90/120

Compare Distributions 

•  A grain processor has two corn crops withaflatoxin levels below 20 parts per billion and aresafe for human consumption. However, becauseaflatoxin varies widely across yields, he wants tocompare the levels of aflatoxin in each of theyields.

• This example uses the file aflatoxin20.sav . Use

the two-sample Kolmogorov-Smirnov test todetermine whether the distribution of aflatoxindiffers significantly between the two safe yields.

Preparing the Data

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 91/120

Preparing the Data

• To center Aflatoxin PPB, from the Data Editor menus choose:

• Transform

Compute...• Type ctrtoxin as the target variable.

• ► Click Type&Label

• Type Centered aflatoxin level as the label.

• ► Click Continue

• Click If in the Compute Variable dialog box.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 92/120

Preparing the Data

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 93/120

Preparing the Data

• Type yield=8 in the expression area.

• ► Click Continue

• Type toxin - 8.4375 in the expression area.

• ► Click OK.

• Click OK to finish centering the variable

Running the Analysis

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 94/120

Running the Analysis

• To begin the analysis, from the menuschoose:

• Analyze

Nonparametric Tests2 Independent Samples

• Select Aflatoxin PPB and Centeredaflatoxin level as the test variables.

• ► Deselect Mann-Whitney U, and selectKolmogorov-Smirnov Z.

• Select Corn yield as the grouping

variable

Select Corn yield as the grouping variable.► Click Define Groups.

Running the Analysis

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 95/120

Running the Analysis

• Type 4 as the group 1 value and 8 as thegroup 2 value.

• ► Click Continue.

• ► Click OK in the Two-Independent-Samples Tests dialog box.

Two Sample K S Frequency Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 96/120

Two-Sample K-S Frequency Table

• The frequency table confirms that thereare 16 cases for each corn yield. In thisexample, the sample sizes of the two

groups are equal, although this is notrequired.

Two Sample K S Test Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 97/120

Two-Sample K-S Test Table

• The first three rows of the test table fall under the general category Most Extreme Differences.The differences referred to are the largestpositive and negative points of divergence

between the CDFs of the two sampledistributions.

• The first difference value, labeled Absolute, isthe absolute value of the larger of the two

difference values printed directly below it. Thisvalue will be required to calculate the teststatistic

Two Sample K S Test Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 98/120

Two-Sample K-S Test Table

• The Positive difference is the point at which the CDF for yield 8 exceeds the CDF for yield 4 by the greatestamount. It is 0 in this case, meaning that the distributionof aflatoxin in yield 8 never exceeds that of yield 4.

•  At the opposite end of the continuum, the Negativedifference is the point at which the CDF for yield 4exceeds the CDF for yield 8 by the greatest amount.

• The Z test statistic is a function of the combined samplesize and the largest absolute difference between the two

cumulative distribution functions.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 99/120

Two-Sample K-S Test Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 100/120

Two-Sample K-S Test Table

• From this table, we can conclude that thesignificance of the difference between thetwo distributions is due only to their 

different locations on the scale, not to anydifferences in shape.

Related Procedures

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 101/120

Related Procedures

• You should use the Mann-Whitney test when you want to test for differences betweentwo groups but you are testing an ordinal variable or you have a scale variable that insome other ways does not conform to the assumptions of the independent-samples ttest. The Mann-Whitney and Wilcoxon tests assume that the variable you are testingis at least ordinal and that its distribution is similar in both groups. You can use thetwo-sample Kolmogorov-Smirnov test to validate the assumption of similar distributions.

• The two-sample Kolmogorov-Smirnov test tests the null hypothesis that two samples

have the same distribution. It's a very flexible test because no specific shape isassumed for the underlying distribution. However, because the test makes noassumptions, it is sensitive to differences in both location and scale. You may want tocenter the test variable if you are not interested in location differences; additionally,you may want to standardize the test variable to remove both location and scale.

• You can alternatively use the Crosstabs procedure to test for differences betweentwo or more groups of an ordinal or nominal variable.

• If your test variable passes the stricter conditions of the two-sample t test, you can

use the Independent-Samples T Test procedure.• If your grouping variable has more than two groups, try the Tests for Several

Independent Samples Tests procedure.• If the samples defined by your grouping variable are not independent, try the Two-

Related-Samples Tests procedure.

Nonparametric Tests for Multiple

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 102/120

Independent Samples

• The nonparametric tests for multipleindependent samples are useful for determining whether or not the values of a

particular variable differ between two or more groups. This is especially true whenthe assumptions of ANOVA are not met.

Methods for Multiple Independent

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 103/120

Samples

•  Although one-way analysis of variance (ANOVA) is the method of choice when testing for differences between multiple groups, itassumes that the mean is a valid estimate of center and that thedistribution of the test variable is reasonably normal and similar in allgroups. However, when your test variable is ordinal, the mean is nota valid estimate because the distances between the values arearbitrary. Even if the mean is valid, the distribution of the test

variable may be so non-normal that it makes you suspicious of anytest that assumes normality.

• When the assumptions behind the standard ANOVA are invalid or suspect, you should consider using the nonparametric proceduresdesigned to test for the significance of the difference betweenmultiple groups. They are called nonparametric because they make

no assumptions about the parameters (such as the mean andvariance) of a distribution, nor do they assume that any particular distribution is being used. In this chapter, we discuss twononparametric tests for multiple independent samples, the Kruskal-Wallis and median tests.

Methods for Multiple Independent

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 104/120

Samples

• The median method tests the null hypothesis that two or more independent samples have the same median. Itassumes nothing about the distribution of the testvariable, making it a good choice when you suspect thatthe distribution varies by group.

• The Kruskal-Wallis test is a one-way analysis of varianceby ranks. It tests the null hypothesis that multipleindependent samples come from the same population.Unlike standard ANOVA, it does not assume normality,and it can be used to test ordinal variables.

• In addition to their standard output, both the Kruskal-Wallis and median tests will display descriptive statisticsand/or quartiles of the test variable.

Using the Median Test to Detect

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 105/120

Group Differences

•  A sales manager evaluates two new trainingcourses. Sixty employees, divided into threegroups, all receive standard training. In addition,group 2 receives technical training, and group 3

receives a hands-on tutorial. Each employeewas tested at the end of the training course andtheir score recorded.

• The results are collected in the file

salesperformance.sav . Use the median test toassess the difference in performance betweenthe three groups, if any.

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 106/120

Obtaining the Analysis

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 107/120

Obtaining the Analysis

• Type 1 as the minimum and 3 as the maximumvalues.

• ► Click Continue.

• ► Click Options in the Tests for SeveralIndependent Samples dialog box.

• Select Quartiles in the Statistics group.

• ► Click Continue.

• ► Click OK in the Tests for Several IndependentSamples dialog box.

Median Test Statistics Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 108/120

Median Test Statistics Table

•  Across all 60 subjects, the medianperformance on the exam is a score justbelow 75. The null hypothesis for the

median test is that this particular value is agood approximation of center for each of the three training groups.

Median Test Frequency Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 109/120

Median Test Frequency Table

• To test this hypothesis, each group isdivided into two subgroups: those whosescores fall at or below the median, and

those whose scores are above it. Theresult is a two-way frequency table withtwo rows and g columns, where g is the

number of categories in your groupingvariable.

Median Test Frequency Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 110/120

Median Test Frequency Table

• In this table, for example, the first cell is a countof the number of employees who receivedstandard training and scored above the median.While the null hypothesis would predict thatabout 10 subjects scored above the median,only four subjects in this group did so.

• In addition to standard training, group 2 alsoreceived some technical training. Unlike theother groups, the median for all trainees does

what the null hypothesis says it should do: itnearly divides this group into two equalsubgroups.

Median Test Frequency Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 111/120

Median Test Frequency Table

• In the final training group, those with exam scoresgreater than the median outnumber those at or below itby a margin of three to one. Like group 1, the nullhypothesis does not provide a good approximation of center for these trainees

• From this two-way frequency table, a chi-square statisticcan be calculated to test the null hypothesis of row andcolumn independence. In fact, the median test is a chi-square test of independence between groupmembership and the proportion of cases above andbelow the median.

Median Test Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 112/120

Median Test Table

• The chi-square value is obtained in the usualfashion for two-way tables. For each cell, thedistance between the observed and expectedcounts is squared, then divided by the expectedvalue. Finally, these quantities are summedacross all cells. For this table, the value is 12.4.

• Degrees of freedom for the frequency table are

equal to (rows - 1) * (columns - 1). In this case,that is 1 * 2 = 2.

Median Test Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 113/120

Median Test Table

• The asymptotic significance tells us how often we canexpect a chi-square value at least as large as 12.4 insimilar repeated samples, if there really is no relationshipbetween the median and group membership. The pFromthis analysis, the manager learns that type of training

resulted in different median scores between the groups.• Trainees who received the hands-on tutorial have a

higher median value than either their counterparts whoreceived standard training or additional technicaltraining.robability is very low: about two times per thousand.

Median Test Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 114/120

Median Test Table

• From this analysis, the manager learnsthat type of training resulted in differentmedian scores between the groups.

Trainees who received the hands-ontutorial have a higher median value thaneither their counterparts who received

standard training or additional technicaltraining.

Using Kruskal-Wallis to TestO di l O t

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 115/120

Ordinal Outcomes

•  Agricultural researchers are studying theeffect of mulch color on the taste of crops.Strawberries grown in red, blue, and blackmulch were rated by taste-testers on anordinal scale of one to five (far below to far above average).

• The results are collected in the file

tastetest.sav . Use the Kruskal-Wallis testto determine if taste varies by mulch color.

Running the Analysis

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 116/120

Running the Analysis

• To begin the analysis, from the menuschoose:

• Analyze

Nonparametric TestsK Independent Samples

• Select Taste scale as the test variable.

• ► Select Mulch color as the groupingvariable.

• ► Click Define Range.

Running the Analysis

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 117/120

Running the Analysis

• Type 1 as the minimum and 3 as themaximum values.

• ► Click Continue.

• ► Click OK in the Tests for SeveralIndependent Samples dialog box.

Kruskal-Wallis Rank Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 118/120

Kruskal Wallis Rank Table

• The Kruskal-Wallis test uses ranks of the originalvalues and not the values themselves. That'sappropriate in this case, because the scale usedby the taste-testers is ordinal.

• First, each case is ranked without regard togroup membership. Cases tied on a particular value receive the average rank for that value.

 After ranking the cases, the ranks are summedwithin groups.

Kruskal-Wallis Test Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 119/120

us a a s est ab e

• The Kruskal-Wallis statistic measures how muchthe group ranks differ from the average rank of all groups.

• The chi-square value is obtained by squaringeach group's distance from the average of allranks, weighting by its sample size, summingacross groups, and multiplying by a constant

The degrees of freedom for the chi-squarestatistic are equal to the number of groups minusone.

Kruskal-Wallis Test Table

7/31/2019 Cmeri Ppt Binomial Nonparametric

http://slidepdf.com/reader/full/cmeri-ppt-binomial-nonparametric 120/120

• The asymptotic significance estimates the probability of obtaining a chi-square statistic greater than or equal tothe one displayed, if there truly are no differencesbetween the group ranks. A chi-square of 9.751 with 2degrees of freedom should occur only about 8 times per 

1,000.• The table tells us the ratings of the strawberries differed

by type of mulch used for cultivation. Like the F test instandard ANOVA, Kruskal-Wallis does not tell us howthe groups differed, only that they are different in someway. The Mann-Whitney test could be used for pairwisecomparisons.