Year 1            LESSON 13          TYPES OF DATA♦    Qualitative     •   Not usually numeric     •   No particular order...
Year 1    DATA TABULATION (1)♦    First stage in making raw data     understandable♦    RAW DATA♦    Number of sheets of l...
Year 1      DATA TABULATION (2)  ♦    Tabulate in (discrete) categories  Category(No of sheets             Tally          ...
Year 1FREQUENCY DISTRIBUTION         (1) ♦   Raw data      •   Raw data are collected data          which have been organi...
Year 1FREQUENCY DISTRIBUTION         (2) ♦   Frequency distribution      •   When summarizing a large          number of r...
Year 1               EXAMPLE♦   A set of 100 students obtained    from an alphabetical listing of an    university record....
Year 1               EXAMPLE    Mass ( kilograms)   Number of Students         60 - 62               5         63 - 65    ...
Year 1        CLASS INTERVAL♦   A symbol defining a class such as    60 - 62 is called a class interval.    The end number...
Year 1            CLASS MARK♦   A class mark is the midpoint of    the class interval and is obtained    by adding the low...
Year 1               MEDIAN (1)♦    The median of a set of numbers     arranged in order of magnitude is     the middle va...
Year 1               MEDIAN (2)♦   Example 2     •   The set of numbers         5, 5, 7, 9, 11, 12, 15, 18     For even nu...
Year 1              MEDIAN (1)♦   For grouped data the median,    obtained by interpolation is given    by                ...
Year 1              MEDIAN (2)♦       ∑ƒ 1        = sum of frequencies                      of all classes lower          ...
Year 1 MEDIAN OF A GROUPEDFREQUENCY DISTRIBUTION ♦   Draw a Cumulative Frequency     Diagram ♦   Search for the middle val...
Year 1   MEDIAN FROM ACUMULATIVE FREQUENCY      DIAGRAM CS113/0401/v1   Lesson 13 - 15
Year 1                MODE (1)♦   The mode of a set of numbers is    that value which occurs with the    greatest frequenc...
Year 1               MODE (2)♦   Example     •   The set          2, 3, 4, 4, 4, 5, 5, 7, 7, 7, 9          has mode 4 and ...
Year 1MODE OF A FREQUENCY   DISTRICUTION♦   Ungrouped data     •   Mode is the x value which has         the highest value...
Year 1           MODAL CLASS            x                 fƒ         51 - 55             12         55 - 60             16...
Year 1               MODE (1)♦   In cases where grouped data    where frequency curve has been    constructed to fit the d...
Year 1               MODE (2)WhereL1       =   lower class boundary of             modal class             (i.e. class con...
Year 1GROUPED MODE FROM   HISTOGRAM (1)♦   Can only ESTIMATE♦   Assume mode is in Modal Class    CS113/0401/v1       Lesso...
Year 1GROUPED MODE FROM   HISTOGRAM (2)♦   Calculation♦   Mode Estimate                      40     = 25 + 5 x            ...
Year 1    ARITHMETIC MEAN (1)♦   The arithmetic mean or the mean    of a set of N numbers X1, X2, X3,    ..., Xn is donote...
Year 1    ARITHMETIC MEAN (2)♦   Eight numbers:    7, 21, 13, 17, 23, 18, 9, 20♦   Add them = 128♦   Divide by 8 = 16♦   T...
Year 1    ARITHMETIC MEAN (3)♦   If the number X1, X2, X3, ..., Xn    occurs ƒ1, ƒ2, ƒ3, ..., ƒn times    respectively, th...
Year 1  MEAN OF A FREQUENCY     DISTRIBUTION    Age (x)         Frequency (ƒ)          ƒx      17                 3       ...
Year 1         HISTOGRAMS (1)♦   Only used for quantitative data♦   Histogram is like a bar chart, but    with no gaps bet...
Year 1     HISTOGRAMS (2)CS113/0401/v1   Lesson 13 - 29
Year 1     HISTOGRAMS (3)CS113/0401/v1   Lesson 13 - 30
Year 1AREA IN HISTOGRAMSCS113/0401/v1   Lesson 13 - 31
Year 1CUMULATIVE FREQUENCY    DIAGRAMS (1)♦   Table 1:    Line of Code    No of Programs         100 -             3      ...
Year 1CUMULATIVE FREQUENCY    DIAGRAMS (2)♦   Table 2:     Line of Code   Cumulative      (less than)   Frequency         ...
Year 1CUMULATIVE FREQUENCY    DIAGRAMS(3)                         240                         220Cummulative Frequency    ...
Year 1STANDARD DEVIATION (1)♦   The Standard Deviation of a set    of N numbers X1, X2, ..., Xn is    denoted by S.D. and ...
Year 1STANDARD DEVIATION (2)   (GROUPED DATA) ♦    If X1, X2, ..., Xn occurs with      frequencies ƒ1, ƒ2, ..., ƒn      re...
Year 1Question 6 c) NCC 1/93  On test the actual access times  for 50 hard disc drives were  distributed as follows:Time (...
Year 1       Alternative Question 6c x        f         fx          fx222.6      1        22.6       510.7622.7      3    ...
Year 1              VARIANCE♦   The variance of a set of data is    defined as the square of the    standard deviation and...
Upcoming SlideShare
Loading in …5
×

MELJUN CORTES -Types of Data

535 views
293 views

Published on

MELJUN CORTES -Types of Data

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
535
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

MELJUN CORTES -Types of Data

  1. 1. Year 1 LESSON 13 TYPES OF DATA♦ Qualitative • Not usually numeric • No particular order • Examples: – Colour, Types of Materials♦ Quantitative • Numeric • Ordered • Measurable • Continuous – E.g. Length, Age, Weight • Discrete – E.g. Shoe size, Number of people CS113/0401/v1 Lesson 13 - 1
  2. 2. Year 1 DATA TABULATION (1)♦ First stage in making raw data understandable♦ RAW DATA♦ Number of sheets of listing paper used by each of 120 jobs17 8 14 17 5 6 11 18 22 14 6 1724 11 18 7 21 14 12 27 13 12 9 1814 29 13 8 9 16 27 21 14 11 19 718 14 21 27 11 10 19 14 12 17 9 1223 16 7 14 21 17 19 24 26 2 5 1817 24 13 17 8 14 13 28 16 7 8 1419 16 18 24 7 14 16 19 11 17 23 1227 9 8 19 13 25 18 21 10 15 11 14 9 8 20 16 8 11 22 10 17 9 18 1214 28 12 10 9 24 20 5 16 7 10 7Not easily digested! CS113/0401/v1 Lesson 13 - 2
  3. 3. Year 1 DATA TABULATION (2) ♦ Tabulate in (discrete) categories Category(No of sheets Tally Frequency used) 0- 1 1 5- 1111 1111 1111 1111 1111 1 26 1111 1111 1111 1111 1111 10 - 37 1111 1111 11 1111 1111 1111 1111 1111 15- 31 1111 1 20 - 1111 1111 1111 1 16 25 - 1111 1111 9 Total 120 Frequency distribution table CS113/0401/v1 Lesson 13 - 3
  4. 4. Year 1FREQUENCY DISTRIBUTION (1) ♦ Raw data • Raw data are collected data which have been organized numerically ♦ Array • An array is an arrangement of raw numerical data in ascending or descending order of magnitude. The difference between the largest and smallest number is called the range of the data CS113/0401/v1 Lesson 13 - 4
  5. 5. Year 1FREQUENCY DISTRIBUTION (2) ♦ Frequency distribution • When summarizing a large number of raw data it is often useful to distribute the data into classes or categories and to determine the number of individuals belonging to each class, called the class frequency CS113/0401/v1 Lesson 13 - 5
  6. 6. Year 1 EXAMPLE♦ A set of 100 students obtained from an alphabetical listing of an university record.♦ Their weights ranging from 60kg to 74kg are tabulated. CS113/0401/v1 Lesson 13 - 6
  7. 7. Year 1 EXAMPLE Mass ( kilograms) Number of Students 60 - 62 5 63 - 65 18 66 - 68 42 69 - 71 27 72 - 74 8 Total 100♦ The first class or category, for example consists of masses from 60 to 62 kg and is indicated by the symbol 60 - 62. Since 5 students have masses belonging to this class, the corresponding class frequency is 5.♦ Data organized and summarized in the above frequency distribution are often called grouped data CS113/0401/v1 Lesson 13 - 7
  8. 8. Year 1 CLASS INTERVAL♦ A symbol defining a class such as 60 - 62 is called a class interval. The end numbers 60 and 62, are called the class limits.♦ The smaller number 60 is the lower class limit and the larger number 62 is the upper class limit. CS113/0401/v1 Lesson 13 - 8
  9. 9. Year 1 CLASS MARK♦ A class mark is the midpoint of the class interval and is obtained by adding the lower and upper class limits and dividing by two♦ In the previous examples, the class mark of the interval 60 - 62 is (60 + 62) / 2 = 61 CS113/0401/v1 Lesson 13 - 9
  10. 10. Year 1 MEDIAN (1)♦ The median of a set of numbers arranged in order of magnitude is the middle value or the arithmetic mean of the two middle values.♦ Example 1 • The set of numbers 3, 4, 4, 5, 6, 8, 8, 8, 10 For an odd number of data the median occurs at position (N + 1) / 2 = 10 / 2 = 5th position Therefore the median = 6 CS113/0401/v1 Lesson 13 - 10
  11. 11. Year 1 MEDIAN (2)♦ Example 2 • The set of numbers 5, 5, 7, 9, 11, 12, 15, 18 For even number of data the median is the average of the two middle values The median =(Pos 4 + Pos 5) / 2 =(9 + 11) / 2 =10 CS113/0401/v1 Lesson 13 - 11
  12. 12. Year 1 MEDIAN (1)♦ For grouped data the median, obtained by interpolation is given by N - ∑ƒ 1♦ MEDIAN = L1 + 2 C ƒ median♦ Where L1 = lower class boundary of the median class(I.e. the class containing the median). N = number of items in the data (I.e. total frequency) CS113/0401/v1 Lesson 13 - 12
  13. 13. Year 1 MEDIAN (2)♦ ∑ƒ 1 = sum of frequencies of all classes lower than the median class♦ ƒ median = frequency of median class♦ c = size of median class interval CS113/0401/v1 Lesson 13 - 13
  14. 14. Year 1 MEDIAN OF A GROUPEDFREQUENCY DISTRIBUTION ♦ Draw a Cumulative Frequency Diagram ♦ Search for the middle value on the cƒ axis and read off the corresponding value on the x axis ♦ This is the median CS113/0401/v1 Lesson 13 - 14
  15. 15. Year 1 MEDIAN FROM ACUMULATIVE FREQUENCY DIAGRAM CS113/0401/v1 Lesson 13 - 15
  16. 16. Year 1 MODE (1)♦ The mode of a set of numbers is that value which occurs with the greatest frequency, I.e. it is the most common value. The mode may not exit, and even of it does exists it may not be unique♦ Example • The set 2, 2, 5, 7, 9, 9, 9, 10, 11, 12, 18 has mode 9♦ Example • The set 3, 5, 8, 10, 12, 15, 16 has no mode CS113/0401/v1 Lesson 13 - 16
  17. 17. Year 1 MODE (2)♦ Example • The set 2, 3, 4, 4, 4, 5, 5, 7, 7, 7, 9 has mode 4 and 7 and is called bimodal♦ A distribution having only one mode is called unimodal CS113/0401/v1 Lesson 13 - 17
  18. 18. Year 1MODE OF A FREQUENCY DISTRICUTION♦ Ungrouped data • Mode is the x value which has the highest value of ƒ♦ Grouped data • Can’t find mode, only the modal class CS113/0401/v1 Lesson 13 - 18
  19. 19. Year 1 MODAL CLASS x fƒ 51 - 55 12 55 - 60 16 61 - 65 10♦ 55 - 60 is the modal class♦ We don’t know x values before grouping, so we can’t find the mode exactly♦ N.B. • Actual mode might not even be in this class CS113/0401/v1 Lesson 13 - 19
  20. 20. Year 1 MODE (1)♦ In cases where grouped data where frequency curve has been constructed to fit the data, the mode will be the value (or values) of x corresponding to the maximum point (or points) on the curve, From a frequency distribution or histogram the mode can be obtained from the following formula, 1 ( Mode = L1 + ( *c 1 + 2 CS113/0401/v1 Lesson 13 - 20
  21. 21. Year 1 MODE (2)WhereL1 = lower class boundary of modal class (i.e. class containing the mode). 1 = excess of modal frequency over frequency of next lower class 2 = excess of modal frequency over frequency of the next higher classc = size of modal class interval CS113/0401/v1 Lesson 13 - 21
  22. 22. Year 1GROUPED MODE FROM HISTOGRAM (1)♦ Can only ESTIMATE♦ Assume mode is in Modal Class CS113/0401/v1 Lesson 13 - 22
  23. 23. Year 1GROUPED MODE FROM HISTOGRAM (2)♦ Calculation♦ Mode Estimate 40 = 25 + 5 x 40 + 64 = 25 + 5 x 40 104 = 25 + 1.9 = 26.9 CS113/0401/v1 Lesson 13 - 23
  24. 24. Year 1 ARITHMETIC MEAN (1)♦ The arithmetic mean or the mean of a set of N numbers X1, X2, X3, ..., Xn is donoted by X is defined as X1 + X2 + X3 + ….. + XnX = N n Σi=1 Xi = N CS113/0401/v1 Lesson 13 - 24
  25. 25. Year 1 ARITHMETIC MEAN (2)♦ Eight numbers: 7, 21, 13, 17, 23, 18, 9, 20♦ Add them = 128♦ Divide by 8 = 16♦ This is the arithmetic mean♦ It is the the most common definition of “average”♦ It only works with quantitative data CS113/0401/v1 Lesson 13 - 25
  26. 26. Year 1 ARITHMETIC MEAN (3)♦ If the number X1, X2, X3, ..., Xn occurs ƒ1, ƒ2, ƒ3, ..., ƒn times respectively, the arithmetic mean is ƒ1X1 + ƒ 2X2 + ….. + ƒnXnX = ƒ1 + ƒ2 + …. ƒn n Σi=1 ƒiXiX = n Σi=1 ƒi CS113/0401/v1 Lesson 13 - 26
  27. 27. Year 1 MEAN OF A FREQUENCY DISTRIBUTION Age (x) Frequency (ƒ) ƒx 17 3 51 18 8 144 19 14 266 20 21 420 21 24 504 22 13 286 23 7 161 24 6 144 25 3 75 26 1 26 Σ ƒ = 100 Σ ƒx = 2077Mean age = 2077 = 20.77 100(rounded to nearest integer, 21) CS113/0401/v1 Lesson 13 - 27
  28. 28. Year 1 HISTOGRAMS (1)♦ Only used for quantitative data♦ Histogram is like a bar chart, but with no gaps between bars and calibrated horizontal axis♦ Order of bars depends on value and on horizontal scale CS113/0401/v1 Lesson 13 - 28
  29. 29. Year 1 HISTOGRAMS (2)CS113/0401/v1 Lesson 13 - 29
  30. 30. Year 1 HISTOGRAMS (3)CS113/0401/v1 Lesson 13 - 30
  31. 31. Year 1AREA IN HISTOGRAMSCS113/0401/v1 Lesson 13 - 31
  32. 32. Year 1CUMULATIVE FREQUENCY DIAGRAMS (1)♦ Table 1: Line of Code No of Programs 100 - 3 125 - 12 150 - 24 175 - 42 200 - 51 225 - 39 250 - 30 275 - 21 300 - 12 325 - 349 6 CS113/0401/v1 Lesson 13 - 32
  33. 33. Year 1CUMULATIVE FREQUENCY DIAGRAMS (2)♦ Table 2: Line of Code Cumulative (less than) Frequency 100 0 125 3 150 15 175 39 200 81 225 132 250 171 275 201 300 222 325 234 350 240 CS113/0401/v1 Lesson 13 - 33
  34. 34. Year 1CUMULATIVE FREQUENCY DIAGRAMS(3) 240 220Cummulative Frequency 200 180 Cumulative 160 Frequency 140 Curve 120 100 80 60 40 20 0 0 50 100 150 200 250 300 350 Lines of code (less than) CS113/0401/v1 Lesson 13 - 34
  35. 35. Year 1STANDARD DEVIATION (1)♦ The Standard Deviation of a set of N numbers X1, X2, ..., Xn is denoted by S.D. and is defined by n♦ S.D. = Σi=1 (Xi - X) 2 N♦ Where X = Arithmetic Mean N = Total Number of element in the set CS113/0401/v1 Lesson 13 - 35
  36. 36. Year 1STANDARD DEVIATION (2) (GROUPED DATA) ♦ If X1, X2, ..., Xn occurs with frequencies ƒ1, ƒ2, ..., ƒn respectively, the standard deviation can be written as n Σj=1 [ ƒj (Xj - X) 2 ]S.D. n Σ j=1 ƒ orS.D. = Σ ƒi Xi Σ ƒi Xi 2 2 - ( ) Σ ƒi Σ ƒi CS113/0401/v1 Lesson 13 - 36
  37. 37. Year 1Question 6 c) NCC 1/93 On test the actual access times for 50 hard disc drives were distributed as follows:Time (ms) 22.6 22.7 22.8 22.9 23.0 23.1 23.2 23.3No. of Drives 1 3 6 10 14 9 5 2Calculate the mean access time and the standard deviation. CS113/0401/v1 Lesson 13 - 37
  38. 38. Year 1 Alternative Question 6c x f fx fx222.6 1 22.6 510.7622.7 3 68.1 1545.8722.8 6 136.8 3119.0422.9 10 229.0 5244.1023.0 14 322.0 7406.0023.1 9 207.9 4802.4923.2 5 116.0 2691.2023.3 2 46.6 1085.78 1149.0 26405.24 (1 mark for each total) 2 [1] [1] 2 [1] Mean = 1149 = 22.98 [1] 50 Σfx 2 ( X )2 S.D = Σf 26405.24 = (22.98)2 50 = 0.156 CS113/0401/v1 Lesson 13 - 38
  39. 39. Year 1 VARIANCE♦ The variance of a set of data is defined as the square of the standard deviation and is thus given by (S.D.) nVariance = Σj=1 [ ƒj (Xj - X) 2 ] ni.e. Σ j=1ƒjVariance = (S.D.)2 CS113/0401/v1 Lesson 13 - 39

×