CHS 221 V ISUALIZING D ATA Week 3 Dr. Wajed Hatamleh 1
V ISUALIZING D ATA Depict the nature of shape or shape of the data distribution In a graph: Different graphs used for different types of data 2
H ISTOGRAM Another common graphical presentation of quantitative data is a histogram. The variable of interest is placed on the horizontal axis. A rectangle is drawn above each class interval with its height corresponding to the interval’s frequency, relative frequency, or percent frequency. 3
H ISTOGRAMS Histograms: Used for quantitative data Similar to a bar graph, with an X and Y axis—but adjacent values are on a continuum so bars touch one another Data values on X axis are arranged from lowest to highest Bars are drawn to height to show frequency or percentage (Y axis) 4
H ISTOGRAMS ( CONT ’ D ) Example of a histogram: Heart rate data f Heart rate in bpm 5
Histogram A bar graph in which the horizontal scale represents the classes of data values and the vertical scale represents the frequencies. Figure 2-1 6
Relative Frequency Histogram Has the same shape and horizontal scale as a histogram, but the vertical scale is marked with relative frequencies. Figure 2-2 7
Histogram and Relative Frequency Histogram Figure 2-1 Figure 2-2
Ogive. n An ogive is a graph of a cumulative distribution. n The data values are shown on the horizontal axis. n Shown on the vertical axis are the: cumulative frequencies, or cumulative frequencies, or cumulative relative frequencies, or cumulative relative frequencies, or cumulative percent frequencies cumulative percent frequencies n The frequency (one of the above) of each class is plotted as a point. n The plotted points are connected by straight lines. 9
Ogive A line graph that depicts cumulative frequencies Figure
B AR G RAPHS Bar graphs: Used qualitative data. Bar graphs have a horizontal dimension (X axis) that specifies categories (i.e., data values) The vertical dimension (Y axis) specifies either frequencies or percentages Bars for each category drawn to the height that indicates the frequency or % 11
B AR G RAPHS Example of a bar graph Note the bars do not touch each other
P IE C HART Pie Charts: Also used for qualitative data. Circle is divided into pie-shaped wedges corresponding to percentages for a given category or data value All pieces add up to 100% Place wedges in order, with biggest wedge starting at “12 o’clock” 13
P IE C HART Example of a pie chart, for same marital status data
Recap In this Section we have discussed graphs that are pictures of distributions. Keep in mind that the object of this section is not just to construct graphs, but to learn something about the data sets – that is, to understand the nature of their distributions. 15
C HARACTERISTICS OF A D ATA D ISTRIBUTION Central tendency Variability Both central tendency and variability can be expressed by indexes that are descriptive statistics 16
C ENTRAL T ENDENCY Indexes of central tendency provide a single number to characterize a distribution Measures of central tendency come from the center of the distribution of data values, indicating what is “typical,” and where data values tend to cluster Popularly called an “average” 17
C ENTRAL T ENDENCY I NDEXES Three alternative indexes: The mode The median The mean 18
T HE M ODE The mode is the score value with the highest frequency; the most “popular” score Age: Mode = 27 The mode 19
T HE M ODE : A DVANTAGES Can be used with data measured on any measurement level (including nominal level) Easy to “compute” Reflects an actual value in the distribution, so it is easy to understand Useful when there are 2+ “popular” scores (i.e., in multimodal distributions) 20
Mode A data set may be: Bimodal Multimodal No Mode denoted by M the only measure of central tendency that can be used with qualitative data 21
a b c Examples Mode is 1.10 Bimodal - 27 & 55 No Mode 22
T HE M ODE : D ISADVANTAGES Ignores most information in the distribution Tends to be unstable (i.e., value varies a lot from one sample to the next) Some distributions may not have a mode (e.g., 10, 10, 11, 11, 12, 12) 23
T HE M EDIAN The median is the score that divides the distribution into two equal halves 50% are below the median, 50% above Age: Median (Mdn) = 28 The median 24
(in order - odd number of values) exact middle MEDIAN is (even number of values – no exact middle shared by two numbers) MEDIAN is
T HE M EDIAN : A DVANTAGES Not influenced by outliers Particularly good index of what is “typical” when distribution is skewed Easy to “compute” 26
T HE M EDIAN : D ISADVANTAGES Does not take actual data values into account—only an index of position Value of median not necessarily an actual data value, so it is more difficult to understand than mode 27
T HE M EAN The mean is the arithmetic average Data values are summed and divided by N Age: Mean = 28.3 The mean 28
T HE M EAN ( CONT ’ D ) Most frequently used measure of central tendency Equation: M = Σ X ÷ N Where: M = sample mean Σ = the sum of X = actual data values N = number of people 29
T HE M EAN : A DVANTAGES The balance point in the distribution: Sum of deviations above the mean always exactly balances those below it Does not ignore any information The most stable index of central tendency Many inferential statistics are based on the mean 30
T HE M EAN : D ISADVANTAGES Sensitive to outliers Gives a distorted view of what is “typical” when data are skewed Value of mean is often not an actual data value 31
T HE M EAN : S YMBOLS Sample means: In reports, usually symbolized as M In statistical formulas, usually symbolized as (pronounced X bar) Population means: The Greek letter μ (mu) 32
Notation µ is pronounced ‘mu’ and denotes the mean of all values in a population x = n ∑ x∑ x is pronounced ‘x-bar’ and denotes the mean of a set of sample values x N µ = ∑ x∑ x 33
Best Measure of Center 34
Symmetric Data is symmetric if the left half of its histogram is roughly a mirror image of its right half. Skewed Data is skewed if it is not symmetric and if it extends more to one side than the other. Definitions 35
Skewness Figure
Recap In this section we have discussed: Types of Measures of Center Mean Median Mode Mean from a frequency distribution Best Measures of Center Skewness 37
M EASURES OF V ARIATION Because this section introduces the concept of variation, this is one of the most important sections in the entire book 38
D EFINITION The range of a set of data is the difference between the highest value and the lowest value value highest lowest value 39
D EFINITION The standard deviation of a set of sample values is a measure of variation of values about the mean 40
S AMPLE S TANDARD D EVIATION F ORMULA ∑ ( x - x ) 2 n - 1 S =S = 41
S AMPLE S TANDARD D EVIATION (S HORTCUT F ORMULA ) n ( n - 1) s = n ( ∑ x 2 ) - ( ∑ x ) 2 42
Standard Deviation - Key Points The standard deviation is a measure of variation of all values from the mean The value of the standard deviation s is usually positive The value of the standard deviation s can increase dramatically with the inclusion of one or more outliers (data values far away from all others ) The units of the standard deviation s are the same as the units of the original data values 43
Definition Empirical ( ) Rule For data sets having a distribution that is approximately bell shaped, the following properties apply : About 68% of all values fall within 1 standard deviation of the mean About 95% of all values fall within 2 standard deviations of the mean About 99.7% of all values fall within 3 standard deviations of the mean 44
The Empirical Rule FIGURE
The Empirical Rule FIGURE
The Empirical Rule FIGURE
A RE YOU R EADY Post test Time 48
Slide Which measure of center is the only one that can be used with data at the catogrical level of measurement? A.Mean B.Median C.Mode
Slide Which of the following measures of center is not affected by outliers? A.Mean B.Median C.Mode
Slide Which of the following measures of center is not affected by outliers? A.Mean B.Median C.Mode
Slide Find the mode (s) for the given sample data. 79, 25, 79, 13, 25, 29, 56, 79 A.79 B.48.1 C.42.5 D.25
Slide Find the mode (s) for the given sample data. 79, 25, 79, 13, 25, 29, 56, 79 A.79 B.48.1 C.42.5 D.25
Slide Which is not true about the variance? A.It is the square of the standard deviation. B. It is a measure of the spread of data. C. The units of the variance are different from the units of the original data set. D. It is not affected by outliers.
Slide Which is not true about the variance? A.It is the square of the standard deviation. B. It is a measure of the spread of data. C. The units of the variance are different from the units of the original data set. D. It is not affected by outliers.
Slide Which of the following measures of center is not affected by outliers? A.Mean B.Median C.Mode
E XERCISE TIME 57
E XERCISE 1 1. The following 10 data values are diastolic blood pressure readings. Compute the mean, the range and SD, for these data
E XERCISE 2 The following are the fasting blood glucose level of 10 children Compute the: a. range b. standard deviation 59
E XERCISE 3 3.The fifteen patients making initial visits to a rural health department travelled these distances: Find: a. Range, b. Standard Deviation Patient Distance (Miles) Patient Distance (Miles)
A NSWER 1. Range = 60 ; SD = Range = 16 ; SD = Range = 12 ; SD =