1 / 26

Statistical Package Usage

Be humble in our attribute, be loving and varying in our attitude, that is the way to live in heaven. Statistical Package Usage. Topic: One Way ANOVA By Dr. Kelly Fan, Cal State Univ, East Bay. Statistical Tools vs. Variable Types. Example: Broker Study.

marva
Télécharger la présentation

Statistical Package Usage

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Be humble in our attribute, be loving and varying in our attitude, that is the way to live in heaven.

  2. Statistical Package Usage Topic: One Way ANOVA By Dr. Kelly Fan, Cal State Univ, East Bay

  3. Statistical Tools vs. Variable Types

  4. Example: Broker Study A financial firm would like to determine if brokers they use to execute trades differ with respect to their ability to provide a stock purchase for the firm at a low buying price per share. To measure cost, an index, Y, is used. Y=1000(A-P)/A where P=per share price paid for the stock; A=average of high price and low price per share, for the day. “The higher Y is the better the trade is.”

  5. CoL: broker 1 12 3 5 -1 12 5 6 2 7 17 13 11 7 17 12 3 8 1 7 4 3 7 5 4 21 10 15 12 20 6 14 5 24 13 14 18 14 19 17 } R=6 Five brokers were in the study and six trades were randomly assigned to each broker.

  6. Statistical Model (Broker is, of course, represented as “categorical”) “LEVEL” OF BROKER 1 2 • • •  •  •  • • • C 1 2 • • • • n Y11 Y12 • • • • • • •Y1c Yij = j + ij i = 1, . . . . . , C j = 1, . . . . . , n Y21 • • • • • • YnI • • • • • Yij Ync •   •  •   •    •   •    •    • 

  7. One-Way Anova F-Test: HO: Level of X has no impact on Y HI: Level of X does have impact on Y HO: 1 = 2 = • • • • 8 HI: not all j are EQUAL

  8. ONE WAY ANOVA The GLM Procedure Dependent Variable: TRADE Sum of Source DF Squares Mean Square F Value Pr > F Model 4 640.800000 160.200000 7.56 0.0004 Error 25 530.000000 21.200000 Corrected Total 29 1170.800000 R-Square Coeff Var Root MSE TRADE Mean 0.547318 42.63283 4.604346 10.80000 Estimate of the common standard deviations

  9. Diagnosis: Normality Normality plot: normal scores vs. residuals • Don’t do the normality checking for all groups but only for the residuals • The points on the normality plot must more or less follow a line to claim “normal distributed”. • There are statistic tests to verify it scientifically. • The ANOVA method we learn here is not sensitive to the normality assumption. That is, a mild departure from the normal distribution will not change our conclusions much.

  10. From the Broker data:

  11. Diagnosis: Equal Variances Residual plot: predicted values vs. residuals • The points on the residual plot must be more or less within a horizontal band to claim “constant variances”. • There are statistic tests to verify it scientifically. • The ANOVA method we learn here is not sensitive to the constant variances assumption. That is, slightly different variances within groups will not change our conclusions much.

  12. From the Broker data:

  13. Multiple Comparison Procedures Once we reject H0: ==...c in favor of H1: NOT all ’s are equal, we don’t yet know the way in which they’re not all equal, but simply that they’re not all the same. If there are 4 columns, are all 4 ’s different? Are 3 the same and one different? If so, which one? etc.

  14. Pairwise Comparison • Goal: grouping levels • Method: Compare each pair of levels • SNK procedure is a popular procedure and introduced here

  15. SAS Output for SNK Procedure

  16. Conclusion : 5 4 2 1 3

  17. Brokers 1 and 3 are not significantly different each other but they are significantly different to the other 3 brokers. Broker 2 and 4 are not significantly different, and broker 4 and 5 are not significantly different, but broker 2 is different to (smaller than) broker 5 significantly. Conclusion : 5 4 2 1 3

  18. Comparisons to Control Dunnett Procedure Designed specifically for comparing several “treatments” to a “control.” Col Example: 1 2 3 4 5 } R=6 6 12 5 14 17 CONTROL

  19. CONTROL 1 2 3 4 5 In our example: 6 12 5 14 17 - Cols 4 and 5 differ from the control [ 1 ]. - Cols 2 and 3 are not significantly different from control.

  20. Contrast • Question 1: Broker 1 vs. the others • Question 2: Brokers 1, 2 are more experienced than the others. Experienced vs. less experienced brokers

  21. SAS Output for Question 1

  22. KRUSKAL - WALLIS TEST (Non - Parametric Alternative) HO: The probability distributions are identical for each level of the factor HI: Not all the distributions are the same

  23. Example: Life Insurance Amount

  24. KRUSKAL - WALLIS TEST

  25. SAS Code DATA INSURANCE; INPUT STATE $ AMOUNT@@; DATALINES; CA 90 CA 200 CA 225 CA 100 CA 170 CA 300 CA 250 KA 80 KA 140 KA 150 KA 140 KA 150 KA 300 KA 280 CO 165 CO 160 CO 140 CO 160 CO 175 CO 155 CO 180 ; ** NON-PARAMETRIC TEST; PROC NPAR1WAY DATA=INSURANCE WILCOXON; TITLE "NONPARAMETRIC TEST TO COMPARE STATES"; CLASS STATE; VAR AMOUNT; RUN;

More Related