Presentation is loading. Please wait.

Presentation is loading. Please wait.

SEEING IS BELIEVING: Telling stories with statistics – in pictures.

Similar presentations


Presentation on theme: "SEEING IS BELIEVING: Telling stories with statistics – in pictures."— Presentation transcript:

1 SEEING IS BELIEVING: Telling stories with statistics – in pictures

2 We’re failing

3 Do you see the same thing here? GenderMaleFemale Military No9431,222 Yes22772

4 This is your brain on statistics GenderMaleFemale Military No9431,222 Yes22772

5 The total sample is (roughly) evenly divided by gender. Subtracting 72 from the 150 one would expect gives a value of about 80, which squared is 6,400. It is already obvious this is significant.

6 Just for closure.. eo(e-o) ^2((e-o)^2)/e

7 Seeing is a learned skill Statisticians may see things in a picture others don’t

8 My points (surprisingly, I do have some)

9 Data Visualization Graphics do not necessarily stand alone

10 Data visualization is all around us.

11 Visual representation in one context is often misapplied to another.

12 Atomic numbers on your socks?

13 Data visualization needs to ADD information

14 Basic Assumptions Our audience needs to be taught to read visual data just as we read numeric data, and we need to learn to have some discussion beyond the choices of line graphs vs. pie charts

15 YOU NEED TO LEARN TO WRITE PICTURES You learned to read numbers Or, to be more specific, you need to explain to others what you see in pictures

16 ? Question + Data > Picture = Story

17 Bad visualization for one question can be good for another Who will win the election? Which regions support the Democrats? Poll dataset did not include Hawaii or Alaska

18 DATA VISUALIZATION BY EXAMPLE AN EXAMPLE OF PROGRAM EVALUATION

19 The government is smarter than you think (No, I’m serious)

20 Was the program implemented as planned?

21

22

23 (This was done in JMP)

24 Did the program work?

25 GOPTIONS HBY = 2 ; PROC GPLOT DATA=wussexampleUNIFORM; PLOT z_total_post * z_total_pre / VREF=0 ; BY group;

26 EQUATIONS IN THE SAS LOG FOR THE STATISTICIAN IN YOU NOTE: Regression equation : z_total_post = *z_total_pre. NOTE: The above message was for the following BY group: group=CONTROL NOTE: Regression equation : z_total_post = *z_total_pre. NOTE: The above message was for the following BY group: group=EXPERIMENTAL

27 Is the intervention successful under all conditions?

28 TRAINING WAS ADMINISTERED TO FOUR COHORTS Admittedly, we did not train people while flying on a trapeze

29

30 Creating the interaction graph First, in the RESULTS window, type sgedit on

31 Creating the interaction graph First, in the RESULTS window, type sgedit on Ods listing sge = on ; Ods graphics on ; proc glm data = plots ; class TestType cohort ; model z_total = TestType cohort TestType*cohort ; where group = "EXPERIMENTAL" ;

32 Click on the sge plot to edit it

33 ODDLY, THE MOST TIME-CONSUMING PART OF THIS IS MAKING THE LINES THICKER Of course, that is kind of like being the smaller midget

34 Using SGEDIT to, well, edit 1.Double-click on the.sge file in the RESULTS window 2.Right-click in the plot area & select PLOT PROPERTIES 3.Select desired line thickness

35 THANKS FOR ASKING! Yes, the TestType*Cohort*Group interaction (F=5.84, p <.0001) AND the TestType*Group interaction (F=22.92, p < 0001) in the other repeated measures ANOVA were significant.

36 LOOKING AT THE LITTLE PICTURE

37 (Especially true for small samples)

38

39 Are these test related? R=.22

40 Look!

41 Another example Years of Education as predictor of gain score R-square =.46 Correlation =.68) P <.01.

42 Now looky here … Is it a real relationship?

43 What should we do? Throw the score out? Keep the score in? Something else?

44 Ignoring my partner … Compare your answers with the people next to you

45 Sometimes outliers are the most interesting part of your study

46

47 PROC CORR

48 One last example on knowing your data Not just telling a story, having a conversation

49 PROC FREQ

50 Custom Map-making How to plot the largest category in a frequency distribution

51 1, 2, 3 1.PROC TABULATE -> output dataset 2.PROC FORMAT 3.Proc GMAP

52 DATA VISUALIZATION BY EXAMPLE WHERE IS DEMOCRATIC SUPPORT BASED? DATA VISUALIZATION IN POLITICAL SURVEYS

53 PROC TABULATE DATA= in.VOTE2008 OUT=SummaryVOTE2008; CLASS question3 state ; TABLE state, question3* RowPctN ;

54 WARNING: Some observations were discarded when charting PctN_01. Only first matching observation was used. Use STATISTIC= option for summary statistics.

55 proc format ; value vote = "Obama" = "McCain" ;

56 PROC GMAP DATA = SummaryVOTE2008 map = maps.us ; ID state ; CHORO PctN_01 / discrete LEGEND=LEGEND1 ;

57 ID statement uses the _map_geometry_ variable that was merged in from the maps.us dataset to identify the location on the map.

58 PROC GMAP DATA = SummaryVOTE2008 map = maps.us ; ID state ; CHORO PctN_01 / discrete LEGEND=LEGEND1 ; Pattern1 c = red ; Pattern2 c = blue ; format PctN_01 vote. ;

59 PROC GMAP CHORO PctN_01 / discrete LEGEND=LEGEND1 ; FORMAT PctN_01 vote. ; CHORO statement uses the first observation and ignores the others.

60

61 Does Race Matter?

62 PROC GMAP Vote2008 coded 0 = McCain 1 = Obama Pctmin = Percentage of residents in voter’s district from minority groups

63 PROC GMAP DATA = wuss map=maps.us ; ID state ; area vote2008 / discrete statistic = mean ; block pctmin / discrete statistic = mean ; format pctmin rangep. vote2008 voten. ;

64 The BLOCK statement charts the pctmin variable. The height of the block will be based on the value of the variable, but the color will be determined using the format specified.

65 mean minority percentage in districts where Obama voters live is 21% versus 13% for McCain voters (t= 5.73, p <.0001)

66 The usefulness of visual data With one statement, I can change the percentage of minority & re-run the chart value rangep = "0 -15%" = "> 15%" ;

67 DATA VISUALIZATION BY EXAMPLE Decision Trees, ROC & Lift Curves to Predict Military Service

68 Speaking of easy, interactive, graphics JMP

69 libname readin "E:\crimes\readout" ; libname writeout xport "e\wuss2010\crimes.xpt" ; proc copy in = readin out =writeout ;

70 How to get a SAS.xpt file into JMP, Step 1 File > Open

71 DECISION TREE ANALYZE > MODELING > PARTITION SELECT Y SELECT X VARIABLES Click on the SPLIT button

72

73 Receiver Operating Characteristic Click on the red arrow at the top left of the partition window for pull-down options include ROC and Lift curves.

74

75 ROC Sensitivity is the percent of true positives, for example, the percentage of people you predicted would die who actually died. Specificity is the percent of true negatives, for example, the percentage of people you predicted would NOT die who survived.

76 Comparing models

77 In JMP, use of training and testing datasets is REALLY easy EXCLUDE 25% or 50% of the data and then re-run your analyses with the excluded sample

78 A statistician is a person who was good at math but didn’t have enough personality to be an accountant ?

79 It is important that people believe you And that’s my story

80 AnnMaria De Mars The Julia Group th St #8 Santa Monica, CA (310)


Download ppt "SEEING IS BELIEVING: Telling stories with statistics – in pictures."

Similar presentations


Ads by Google