Module 1 Session 5/6 Practical 3: Tables and graphs (Principles of Official Statistics) Work in pairs 1. Evaluating table 1 in the report Table 1 given in the report of the survey of the principles of official statistics is as follows: CAST on page 5.2.2 suggests an improved layout shown on the next page. What are your views on the differences? Districts Training Programme Module 1 Session 5/6 – Page 1 Module 1 Session 5/6 2. A second table The tables above show that the developing world and particularly the least developed countries were under-represented in the responses. This aspect was noted in the commentary on Table 1, but then largely ignored in the percentages given in the rest of the report. Table 2 from the report is as follows: Districts Training Programme Module 1 Session 5/6 – Page 2 Module 1 Session 5/6 An alternative layout for the information in this table is below: Question: In your country, overall, this principle is Fully, Largely, Somewhat or Not implemented Percentage of countries Principle Relevance, impartiality and equal access Professional standards and ethics Accountability and transparency Prevention of misuse Sources of official statistics Confidentiality Legislation National Coordination Use of International standards Fully 46 59 43 37 49 80 77 31 45 Largely 45 37 50 37 42 19 17 44 50 Somewhat 9 4 6 19 8 0 4 19 5 List 3 differences between the 2 versions of this table. Explain which you find is clearer, and why. Number of Not 1 1 1 7 1 1 3 6 1 responses 112 112 112 111 111 112 112 110 111 Difference 1: Clearer? Districts Training Programme Module 1 Session 5/6 – Page 3 Module 1 Session 5/6 3. Producing 1-way tables In the workbook called Fundamental Principles.xls go to the sheet called Data. Using the Excel Pivot-table, produce a simple one-way table of the first principle to give both the counts and the percentages. Your table should look something like this: Producing this table should now be straightforward. If not, then practice with some of the other principles and note the steps below to help you in the future. Note of steps if needed: In previous use of pivot tables you have seen how to re-order, merge and hide columns. In the table above, hide the category called “Fully”. Write your interpretation of the percentages that remain. Districts Training Programme Module 1 Session 5/6 – Page 4 Module 1 Session 5/6 4. Producing a 2-way table1 Return to the sheet called Data and produce a 2-way table to split the responses for the first principle, by the type of country. The table should look like this: In this table, notice the last row and the last column are both called “Grand Total” by Excel. We will use the term “Margin”, or “Table margin” because (like the margin of a page) they are the edges around the main part of the table. 1 Look at the Count in the one-way table in question 3. What does the margin give there? In this 2-way table there is both a right-margin and a bottom margin. Look first at the bottom margin. What does it give? Compare it to the one-way table in question 3. What information do you get from the right margin in the 2-way table? For example what do the 58 and 15 mean? These tables are for training purposes only. The UN was unable to supply the real data, so the values used here have been constructed for this training course. The margins are correct. Districts Training Programme Module 1 Session 5/6 – Page 5 Module 1 Session 5/6 Complete the following sentence to give the general concept: The margins of a 2-way table are ________ tables. This can be taken further. If you go downwards then The margin of a 1-way table is a 0-way table – that’s just a single number! What is it in the examples above? __________ Note: One reason we use the word Margin, where Excel uses Grand Total is that the table margins will not always contain totals. 5. Interpreting the percentages Transform the information above to give percentages. You have a choice of Row, Column or Total. First give the row percentages. You should get the table below. Notice, as the name implies, with row percentages, each row in this table adds to 100%. So, in this table, the right margin is not interesting, except to confirm that you have done the right thing. Look at the bottom margin. How does it compare with the information in the oneway table in question 3? Now interpret the results in this table, by completing the sentences below: Districts Training Programme Module 1 Session 5/6 – Page 6 Module 1 Session 5/6 79% of the developed countries said they had fully implemented the principles. This compares with _____ of the developing countries and ________ of the least developed countries. At the other extreme only 3% of the developed countries said they had not either fully or largely implemented the principles, compared with ______ of the developing countries and _______ of the least developed countries. Compare the clarity of the table giving the percentages (question 5), with the counts, (question 4). The percentages make the information clear, but might be a bit misleading in the report, because of the small numbers. So, as an alternative, use mainly the table of counts (question 4) to modify your interpretation of the table. Complete the information given below: All but one of the 39 developed countries that responded, said they had either fully, or largely implemented the principles, and 4 out of 5 had fully implemented the principle. In contrast, in the least developed countries ______ out of the 15 respondents stated they had fully implemented the principle, and just over _______ responded “Largely”. Now produce the column percentage and also the overall percentages. Complete the reports started below: From the column percentages: 51 countries said they had Fully implemented the principles. Of those countries, ___ out of 10 were from the developed world, while ____ were from the least developed countries. In contrast, all but ____ of the countries who responded that they had not either Fully or Largely implemented the principle were from __________________ From the overall percentage: Of the countries responding, almost 30% who responded “Fully” were developed countries and about 30% of those who responded “Largely” were developing countries. So which percentage you give depends on your main interest. Here the type of country is in the rows. So if your main interest is: a) The different types of country, then give the row percentage b) The different levels of implementation, then give the column percentage c) The different countries, then give the overall percentage Districts Training Programme Module 1 Session 5/6 – Page 7 Module 1 Session 5/6 With 2-way tables, usually you will choose between the row percentage and the column percentage. The overall percentage (% of total in Excel) is rarely needed 6. A larger table In the Excel workbook, the sheet called Data, gives the data in list format. And list format is needed for Excel’s Pivot tables. The sheet called From Data, gives the information in Table 2 of the report. Examine cell B5 in the From Data sheet as an example. This is not a pivot table. What is the calculation that produced the value? The COUNTIF is a useful function so there is a demonstration of a different way of producing tables. But the main point here is that the layout of the data in the sheet called Data, does not permit the information in the From Data sheet to be given as a Pivot table. Look at the sheet called Stack. How many rows of data are there? ________ How does this compare to the layout in the sheet called Data. Click on a cell, like A2 to confirm that the information in the 2 sheets is related. (For those who are interested, the SSC-Stat add-in has a special menu to be able to stack the data easily. This was used here.) The layout in the Stack worksheet enables the appropriate pivot table to be produced. Districts Training Programme Module 1 Session 5/6 – Page 8 Module 1 Session 5/6 Use the Pivot-table wizard to produce a 2-way table of Principle (as the rows) and Implemented (as the columns). It should look as shown above One minor problem with this table is that the bottom margin is meaningless, because the rows of data are responses to different questions. The margins of a table are not always useful. Hence use the facility for Table Options to give the dialogue below. The option for “Grand totals for columns” is un-ticked, as shown, to get rid of the bottom margin. Now add the Type of country variable into this table. Part of the resulting table is shown below: Districts Training Programme Module 1 Session 5/6 – Page 9 Module 1 Session 5/6 This is a 3-way table. It has 2 row factors and one column factor. Examine the rows in this table that say “Total”. These are also called the “Margins”. How does the data there compare with the 2-way table above? This extends the ideas on margins from question 4. In general it is also possible to include more factors, to make 4-way tables, etc. Hence complete the following: The margin of a 1-way table is a 0-way table, i.e. a single number The margins of a 2-way table are ____________ The margins of a 3-way table are _____________ The margins of a 4-way table are _____________ Finally what about percentages in a 3-way table? Try both row percentages and column percentages. What do you notice? Does this give you a usable “rule” for Excel with 3-way or higher tables. Complete the text below: With this layout there is just one column factor (Level of implementation). So ________ percentages are easy to interpret. There are 2 row factors (Principle and Type of country) So ________ percentages are difficult to interpret. Hence if percentages are needed then orientate the table so _________ _____________________________________________ This limitation on percentage is just with Excel. Most statistics packages allow more flexibility in which percentages to produce. Districts Training Programme Module 1 Session 5/6 – Page 10