Presentation is loading. Please wait.

Presentation is loading. Please wait.

X y Exploratory data analysis Cross tabulations and scatter diagrams.

Similar presentations


Presentation on theme: "X y Exploratory data analysis Cross tabulations and scatter diagrams."— Presentation transcript:

1 x y Exploratory data analysis Cross tabulations and scatter diagrams

2 Exploratory data analysis consists of simple arithmetic and easy-to-draw graphs that can be used to summarize data quickly

3 The Stem and Leaf Display A stem-and-leaf display shows both the rank order A stem-and-leaf display shows both the rank order and shape of the distribution of the data. and shape of the distribution of the data. It is similar to a histogram on its side, but it has the It is similar to a histogram on its side, but it has the advantage of showing the actual data values. advantage of showing the actual data values. The first digits of each data item are arranged to theThe first digits of each data item are arranged to the left of a vertical line. left of a vertical line. To the right of the vertical line we record the lastTo the right of the vertical line we record the last digit for each item in rank order. digit for each item in rank order.

4 Example: Hudson Auto Repair The manager of Hudson Auto would like to have a better understanding of the cost of parts used in the engine tune-ups performed in the shop. She examines 50 customer invoices for tune-ups. The costs of parts, rounded to the nearest dollar, are listed on the next slide.

5 Stretched Stem and Leaf If we believe the original stem-and-leaf display has condensed the data too much, we can stretch the display by using two stems for each leading digit(s).If we believe the original stem-and-leaf display has condensed the data too much, we can stretch the display by using two stems for each leading digit(s). Whenever a stem value is stated twice, the first value corresponds to leaf values of 0 - 4, and the second value corresponds to leaf values of 5 - 9.Whenever a stem value is stated twice, the first value corresponds to leaf values of 0 - 4, and the second value corresponds to leaf values of 5 - 9.

6 Sample parts cost for 50 tune-ups

7 5 6 7 8 9 10 2 7 2 2 2 2 5 6 7 8 8 8 9 9 1 1 2 2 3 4 4 5 5 5 6 7 8 9 9 9 0 0 2 3 5 8 9 A Stem and Leaf Display for the Auto Parts Cost data 1 3 7 7 7 8 9 1 4 5 5 9 Stem Leaf

8 5 6 7 8 9 10 Stretched Stem and Leaf for Hudson Auto parts data 7 2 5 6 7 8 8 8 9 9 2 2 1 1 2 2 3 4 4 5 5 5 6 7 8 9 9 9 0 0 2 3 5 8 9 7 7 7 8 9 1 3 5 5 9 1 4

9 Leaf Units A single digit is used to define each leaf. In the preceding example, the leaf unit was 1. But it does not have to be 1. The leaf unit can be 0.1, 10, or 100.

10 Example: Leaf unit =.1 Suppose we have the following data: 8.6 11.7 9.4 10.2 11.0 8.8 The leaf unit is.1. Thus: 8 9 10 11 6 8 4 2 0 7

11 Example: Leaf Unit = 10 If we have data with values such as 16 17 18 19 Leaf Unit = 10 8 1 9 0 3 1 7 1806171719741791168219101838 a stem-and-leaf display of these data will be The 82 in 1682 is rounded down to 80 and is represented as an 8.

12 Crosstabulations and Scatter Diagrams So far we have considered only ONE variable (parts cost, audit time). But often we are interested in tabular and graphical data that uncover the relationship between TWO variables.

13 Crosstabulations A tabular method for summarizing the data for two variables simultaneously Crosstabulations can be used when one variable is qualitative and the other is quantitative, one variable is qualitative and the other is quantitative, both variables are qualitative, or both variables are qualitative, or both variables are quantitative. both variables are quantitative.

14 Price Range Colonial Log Split Split A-Frame Total < $99,000 > $99,000 18 6 19 12 55 45 30 20 35 15 Total 100 12 14 16 3 Home Style Home Style Example: Finger Lakes Homes n Crosstabulation The number of Finger Lakes homes sold for each style and price for the past two years is shown below. quantitative variable variable qualitative

15 Using Excel’s Pivot Table Report to Construct A Crosstabulation Excel Worksheet Containing Finger Lakes Data Rows 10-101 are not shown

16 n Changing Default Order for PivotTable Report Using Excel’s PivotTable Report to Construct a Crosstabulation Step 3 When the Options dialog box appears: Select the Custom lists tab Select the Custom lists tab In the List entries: box, type <= 99K and In the List entries: box, type <= 99K and press Enter, and type > 99K press Enter, and type > 99K Click Add Click Add Click OK Click OK Step 2 Choose Options Step 1 Select the Tools menu

17 n Using the PivotTable Report Step 1 Select the Data menu Step 2 Choose the PivotTable and PivotChart Report Step 3 When the PivotTable and PivotChart Wizard – Step 1 of 3 dialog box appears: Step 1 of 3 dialog box appears: Choose Microsoft Excel list or database Choose Microsoft Excel list or database Choose PivotTable Choose PivotTable Click Next > Click Next >... continue Using Excel’s PivotTable Report to Construct a Crosstabulation

18 n Using the PivotTable Report Using Excel’s PivotTable Report to Construct a Crosstabulation Step 4 When the PivotTable and PivotChart Wizard – Step 2 of 3 dialog box appears: Step 2 of 3 dialog box appears: Enter A1:C101 in the Range box Enter A1:C101 in the Range box Click Next > Click Next >... continue

19 n Using the PivotTable Report Using Excel’s PivotTable Report to Construct a Crosstabulation Step 5 When the PivotTable and PivotChart Wizard – Step 3 of 3 dialog box appears: Step 3 of 3 dialog box appears: Select New Worksheet Select New Worksheet Click Layout Click Layout... continue Using Excel’s PivotTable Report to Construct a Crosstabulation

20 n Using the PivotTable Report Using Excel’s PivotTable Report to Construct a Crosstabulation Step 5 (continued) When the PivotTable and PivotChart When the PivotTable and PivotChart Wizard – Layout diagram appears: Wizard – Layout diagram appears: Double click the Count of Home field button in the data section button in the data section Drag the Home field button to the DATA section of the diagram section of the diagram Drag the Style field button to the COLUMN section of the diagram COLUMN section of the diagram Drag the Price ($) field button to the ROW section of the diagram ROW section of the diagram... continue Using Excel’s PivotTable Report to Construct a Crosstabulation

21 n Using the PivotTable Report Using Excel’s PivotTable Report to Construct a Crosstabulation When the PivotTable and PivotChart Wizard Step 3 of 3 dialog box reappears: Click Finish > Click Finish > Step 5 (continued) When the PivotTable Field dialog box appears: appears: Choose Count under Summarized by : Choose Count under Summarized by : Click OK Click OK Click OK Using Excel’s PivotTable Report to Construct a Crosstabulation

22

23 n Value Worksheet Using Excel’s PivotTable Report to Construct a Crosstabulation Note: Columns A-C are not shown.

24 Example: Finger Lakes Homes Insights Gained from Preceding Crosstabulation Only three homes in the sample are an A-Frame Only three homes in the sample are an A-Frame style and priced at more than $99,000. style and priced at more than $99,000. The greatest number of homes in the sample (19) The greatest number of homes in the sample (19) are a split-level style and priced at less than or are a split-level style and priced at less than or equal to $99,000. equal to $99,000.

25 Crosstabulation: Row or Column Percentages Converting the entries in the table into row percentages or column percentages can provide additional insight about the relationship between the two variables.

26 Price Range Colonial Log Split A-Frame Total < $99,000 > $99,000 32.73 10.91 34.55 21.82 100100 Note: row totals are actually 100.01 due to rounding. 26.67 31.11 35.56 6.67 Home Style Home Style (Colonial and > $99K)/(All >$99K) x 100 = (12/45) x 100 Crosstabulation: Row Percentages

27 Price Range Colonial Log Split A-Frame < $99,000 > $99,000 60.00 30.00 54.29 80.00 40.00 70.00 45.71 20.00 Home Style Home Style 100 100 100 100 Total (Colonial and > $99K)/(All Colonial) x 100 = (12/30) x 100 Crosstabulation: Column Percentages

28 Crosstabulation for the LA Restaurant Example Meal Price ($) Quality Rating10-1920-2930-3940-49 Grand Total Good42402 84 Very Good3464466150 Excellent214282266 Grand Total781187628300 Chapter 2 file Restaurant.xls

29 The general pattern of the plotted points suggests the The general pattern of the plotted points suggests the overall relationship between the variables. overall relationship between the variables. One variable is shown on the horizontal axis and the One variable is shown on the horizontal axis and the other variable is shown on the vertical axis. other variable is shown on the vertical axis. A scatter diagram is a graphical presentation of the A scatter diagram is a graphical presentation of the relationship between two quantitative variables. relationship between two quantitative variables. Scatter Diagram and Trendline A trendline is an approximation of the relationship. A trendline is an approximation of the relationship.

30 A Positive Relationship Y X 0

31 A Negative Relationship Y X 0

32 No Apparent Relationship Y X 0

33 Example: Panthers Football Team Scatter Diagram The Panthers football team is interested in investigating the relationship, if any, between interceptions made and points scored. 1 3 2 1 3 14 24 18 17 30 x = Number of Interceptions y = Number of Points Scored Points Scored

34 Scatter Diagram y x Number of Interceptions Number of Points Scored 5 10 15 20 25 30 035 12304

35 n Insights Gained from the Preceding Scatter Diagram The relationship is not perfect; all plotted points in The relationship is not perfect; all plotted points in the scatter diagram are not on a straight line. the scatter diagram are not on a straight line. Higher points scored are associated with a higher Higher points scored are associated with a higher number of interceptions. number of interceptions. The scatter diagram indicates a positive relationship The scatter diagram indicates a positive relationship between the number of interceptions and the between the number of interceptions and the number of points scored. number of points scored. Example: Panthers Football Team

36 Using Excel’s Chart Wizard to Construct a Scatter Diagram and Trendline n Formula Worksheet (showing data entered)

37 Step 1 Select cells A1:B6 Step 2 Click the Chart Wizard button on standard toolbar Step 3 When the Chart Wizard - Step 1 of 4 - Chart Type dialog box appears: dialog box appears: Choose XY (Scatter) in the Chart Type list Choose XY (Scatter) in the Chart Type list Choose Scatter from the Chart subtype display Choose Scatter from the Chart subtype display Click Next > Click Next > Using Excel’s Chart Wizard to Construct a Scatter Diagram... continue

38 Using Excel’s Chart Wizard to Construct a Scatter Diagram Step 4 When the Chart Wizard - Step 2 of 4 - Chart Source Data dialog box appears: Source Data dialog box appears: Click Next > Click Next >... continue

39 Using Excel’s Chart Wizard to Construct a Scatter Diagram Step 5 When the Chart Wizard - Step 3 of 4 – Chart Options dialog box appears: Options dialog box appears: Select the Titles tab and then Select the Titles tab and then Type Scatter Diagram for the Panthers Type Scatter Diagram for the Panthers in the Chart title: box in the Chart title: box Type Number of Interceptions in the Type Number of Interceptions in the Value (X) axis: box Value (X) axis: box Type Number of Points Scored in the Type Number of Points Scored in the Value (Y) axis: box Value (Y) axis: box... continue

40 Step 5 (continued) Select the Legend tab and then Select the Legend tab and then Remove the check in the Show Legend box Click Next > Click Next > Using Excel’s Chart Wizard to Construct a Scatter Diagram Step 6 When the Chart Wizard – Step 4 of 4 - Chart Location dialog box appears: Location dialog box appears: Specify a location for the new chart Specify a location for the new chart Click Finish Click Finish

41 Using Excel’s Chart Wizard to Construct a Scatter Diagram

42 n Adding a Trendline Using Excel’s Chart Wizard to Construct a Scatter Diagram and Trendline Step 3 When the Add Trendline dialog box appears: Select the Type tab and then Select the Type tab and then Choose Linear from the Trend/ Choose Linear from the Trend/ Regression type display Regression type display Click OK Click OK Step 2 Choose the Add Trendline option Step 1 Position the mouse pointer over any data point in the scatter diagram and right click point in the scatter diagram and right click

43 Using Excel’s Chart Wizard to Construct a Scatter Diagram and Trendline

44 Scatter Diagram for the Stereo and Sound Equipment Store Example

45 Scatter Diagram for the Stereo and Sound Equipment Store Example—with a Trendline


Download ppt "X y Exploratory data analysis Cross tabulations and scatter diagrams."

Similar presentations


Ads by Google