Statistics (Stat 101) Sameh Saadeldin Ahmed Associate Professor of Environmental Eng. Civil Engineering Department Engineering College Almajma’ah University smohamed1@ksu.edu.sa http://faculty.ksu.edu.sa/SaMeH Stat 101 Dr SaMeH 1 Chapter 1 Week 1st week Stat 101 Subject Content Concepts of •What is Statistics? Probability •Types of Statistics and Statistics •Basic Terms •Types of Variables •Sources of Data •Data Collection Approaches Dr SaMeH 2 Contents (week by week) Week 2nd week 3rd week Stat101 Subject Content •Organizing and Graphing Organizing Qualitative Data •Organizing and Graphing Data Quantitative Data •Shapes of Histograms Histogram, Polygon, Frequency Curve •Cumulative Frequency Distributions Dr SaMeH 3 2.1 Raw Data Data recorded in the sequence in which they are collected and before they are processed or ranked are called raw data Example 2.1: Table 2.1 gives a quantitative raw data for the ages of 50 students selected from a college. Stat 101 Dr SaMeH 4 Tables 2.1 and 2.2: Age and Grades of 50 students 21 19 24 25 29 34 26 27 37 33 18 20 19 22 19 19 25 22 25 23 25 19 31 19 23 18 23 19 23 26 22 28 21 20 22 22 21 20 19 21 Stat 101 C A B D C C D C C C A A C A A A D B D C C A D B B A C A D D B D C B B C C B A B Dr SaMeH 5 2.2 Organizing and Graphing Qualitative Data • Data sets are organized into tables, and data are displayed using graphs. 2.2.1 Frequency Distribution A frequency distribution exhibits how the frequencies are distributed over various categories. Stat 101 Dr SaMeH 6 Example 2.2: Table 2.3 shows the grades of 60 students in Math 105. It is required to summarise the data in a table form. Tables 2.3 : Grads of 60 Students in Math 105 D B E C B E C D B C D A C D E Stat 101 D B E D C E A D D A E C D C C D B D D A D D C D C D A B D B D C D C D B C D C C C E Dr SaMeH E D A 7 Solution Type (grade) Tally A //// / B Type (grade) C A B D E C SUMD E SUM 6 Frequency (f) 8 6 16 8 22 16 8 22 60 8 60 Category Stat 101 Frequency (f) Dr SaMeH frequency 8 Frequency Distribution for Qualitative Data A frequency distribution for qualitative data lists all categories and the number of elements that belong to each of the category. Stat 101 Dr SaMeH 9 2.2 Organizing and Graphing Qualitative Data 2.2.1 Frequency Distribution 2.2.2 Relative Frequency & Percentage A relative frequency of a category is obtained by dividing the frequency of that category by the sum of all frequencies. Stat 101 Dr SaMeH 10 Calculating Relative Frequency of a Category Relative frequency of a category = frequency of that category / sum of all frequencies Calculating Percentage Percentage = (Relative frequency) x 100 Stat 101 Dr SaMeH 11 Example 2.3: Determine the relative frequency and percentage distributions for the data in Table 2.3 Solution: Type Frequency (f) A B C D E SUM Stat 101 6 8 16 22 8 60 Relative Frequency 6/60 = 0.1 8/60 = 0.1333 16/60 = 0.266 22/60 = 0.366 8/60 = 0.133 1.00 Dr SaMeH Percentage 0.1 (100) = 10 0.133 (100) = 13.3 0.266 (100) = 26.6 0.366 (100) = 36.6 0.133 (100) = 13.3 100 12 Example 2.4: The following data represents the marks of 50 students in a subject 51 95 70 74 73 90 71 74 90 67 91 72 83 89 50 80 72 84 85 69 62 82 87 76 91 76 87 75 78 79 71 96 81 88 64 82 73 57 86 70 You are required to: •Construct a table shows grade distribution of the student’s grades. •A table shows the frequency distribution of the student’s marks. •A table shows the relative distribution of the student’s marks. •A table shows the percentage frequency distribution of the student’s marks. Stat 101 Dr SaMeH 13 Solution 1- A table shows the distribution of the student’s grades Category Tally Frequency 50 – 59 /// 3 60 – 69 5 70 – 79 18 Category Frequency 80 – 89 16 3 90 - 99 50 – 59 8 60 – 69 5 SUM 50 70 – 79 18 90 - 99 SUM 8 50 2- A table show the Frequency distribution of the 16 student’s marks 80 – 89 Stat 101 Dr SaMeH 14 3- A table shows the relative distribution of the student’s marks Category Frequency (f) Relative Frequency 50 – 59 60 – 69 70 – 79 80 – 89 90 - 99 SUM Stat 101 3 5 18 16 8 50 3/50 = 0.06 5/50 = 0.10 18/50 = 0.36 16/50 = 0.32 8/50 = 0.16 1.00 Dr SaMeH 15 4- A table shows the percentage frequency distribution of the student’s marks. Category Frequency Relative (f) Frequency Percentage 50 – 59 60 – 69 70 – 79 80 – 89 90 - 99 SUM 3 5 18 16 8 50 0.06 (100) = 6 0.10 (100) = 10 0.36 (100) = 36 0.32 (100) = 32 0.16 (100) = 16 100 Stat 101 3/50 = 0.06 5/50 = 0.10 18/50 = 0.36 16/50 = 0.32 8/50 = 0.16 1.00 Dr SaMeH 16 2.2 Organizing and Graphing Qualitative Data 2.2.1 Frequency Distribution 2.2.2 Relative Frequency & Percentage 2.2.3 Graphical Presentation of Qualitative Bar Graphs Pie Chart. Stat 101 Dr SaMeH 17 Bar Graphs To construct the bar graph or bar chart, we mark the various categories on the horizontal axis (all categories are represented by intervals of the same width). The frequencies are presented on the vertical axis. The height of the bar represents the frequency of the corresponding category. Stat 101 Dr SaMeH 18 The bar graphs for the relative frequency and percentage distributions can be drawn by making the relative frequencies or percentages, instead of the class frequencies on the vertical axis. Stat 101 Dr SaMeH 19 Pie Chart A circle divided into portions that represent the relative frequencies or percentages of a population or a sample belonging to different categories. Stat 101 Dr SaMeH 20 2.3 Organizing and Graphing Quantitative Data 2.3.1 Frequency Distribution Table 2.4 gives the weekly earnings of 100 employees of a large company. The first column lists the classes, which represent the (quantitative) variable weekly earnings. For quantitative data, an interval that includes all the values that falls within two numbers. The lower and upper limits, is called a class. Note that the classes always represent a variable. The second column lists the number of employees who have earnings within each class (frequency). Stat 101 Dr SaMeH 21 Table 2.4: Weekly earnings of 100 employees of a company variable Second Class Lower Limit Stat 101 Weekly earnings (dollars) 401 to 600 601 to 800 801 to 1000 1001 to 1200 1201 to 1400 1401 to 1600 Number of employees (f) 9 22 39 15 9 6 Upper Limit Dr SaMeH Frequency of Third class 22 Frequency Distribution for Quantitative Data A frequency distribution for quantitative data lists all classes and the number of values that belong to each class. Data in the form of a frequency distribution are called grouped data. To find the midpoint of the upper limit of the first class and the lower limit of the second class in Table 2.4, we divide the sum of these two limits by 2. Thus, this midpoint is [600 + 601] / 2 = 600.5 The value 600.5 is called the upper boundary of the first class and the lower boundary of the second class. Stat 101 Dr SaMeH 23 Class Boundary The class boundary is given by the midpoint of the upper limit of one class and the lower limit of the next class. We can convert the class limits of table 2.4 to class boundaries, which are also called real class limits. The second column of table 2.5 lists the boundaries for table 2.4. Stat 101 Dr SaMeH 24 Table 2.5: Class boundaries, Class widths, and Class midpoints for Table 2.4 Class Limits Class boundaries 401 to 600 601 to 800 801 to 1000 1001 to 1200 1201 to 1400 1401 to 1600 400.5 to less than 600.5 600.5 to less than 800.5 800.5 to less than 1000.5 1000.5 to less than 1200.5 1200.5 to less than 1400.5 1400.5 to less than 1600.5 Class Class width Midpoint 200 200 200 200 200 200 500.5 700.5 900.5 1100.5 1300.5 1500.5 The difference between the two boundaries of a class gives the class width. The class width is called the class size. Stat 101 Dr SaMeH 25 Finding Class Width Class width = Upper boundary – Lower boundary The class midpoint or mark is obtained by dividing the sum of the two limits (or the two boundaries) of a class by 2. Calculating Class Midpoint or Mark Class midpoint or mark = [Lower limit + Upper limit] / 2 Thus the midpoint of the first class in Table 2.4 or Table 2.5 is calculated as follows: Midpoint of the first class = [401 + 600] / 2 = 500.5 Stat 101 Dr SaMeH 26 Example 2.5: Use the data given in example 2.4 to calculate the class limits, class boundaries, midpoints and list the calculated relative frequencies and percentage, all in one table. A table shows all the above and the class midpoint. Solution: Class Limits Class Boundaries Class Midpoint Frequency f Relative Percentage Frequency 50 – 59 60 – 69 70 – 79 80 – 89 90 – 99 SUM 49.5 – 59.5 59.5 – 69.5 69.5 – 79.5 79.5 – 89.5 89.5 – 99.5 54.5 64.5 74.5 84.5 94.5 3 5 18 16 8 50 0.06 0.10 0.36 0.32 0.16 1.00 Stat 101 Dr SaMeH 6 10 36 32 16 100 27 End of Part 3 Get ready for a quiz (2)…… next lecture!! Stat 101 Dr SaMeH 28