Chapter 3: Frequency Distributions 3.1 Qualitative Frequency Distribution and Histogram (qualitative data) Learning Activity 3.1-1 Qualitative Frequency Distribution Open RealEstateData.xls!Data Use the MegaStat | Frequency Distributions | Qualitative K2:K126 as input range and N5:O9 as specification range Change the title to “Percent of House in Each Subdivision.” Modify the chart by right-clicking one of the histogram bars, | 資料數列格式 | 填滿 Rerun using N19:Q20 as the specification range. Learning Activity 3.1-2: Region.xls!Data Learning Activity 3.1-3: Poll1.xls!Data “There are three kinds of lies: lies, damned lies and statistics.” Learning Activity 3.1-4 How to lie with statistics (scaling histogram) Use the output from Learning Activity 3.1-1. Right-click the vertical axis Select 座標軸格式 Click the 刻度and type in the minimum and maximum values Use 0 and 100 Use 10 and 32 Note: When you see a histogram or any graphs, look at the scaling. 3.2 Quantitative Frequency Distribution and Histogram Determine Interval Width and Setup Intervals 1. Calculate the range of the data 2. Determine an approximate number of intervals, k. Use EXCEL function to find k~=LOG(data number,2) 3. Use a round number of range/k as your interval. A round number is an even multiple of power of 10 times 1, 2, or 5, e.g. 45.4 would be 50. 4. MegaStat will set up the intervals for you. 2k k 16 4 32 5 64 6 128 7 256 8 512 9 1024 10 Your sample size ~ 2k, then K is your number of intervals. Learning Activity 3.2-1 Frequency distribution, histogram Open RealEstateData.xls!Data. Use MegaStat|Frequency Distributions|Quantitative Specify the Price variable (B2:B126) as the input range. Type 100 as the interval width Rerun, specifying 10 as the interval width Rerun, specifying 250 as the interval width Let the MegaStat chose the interval width Learning Activity 3.2-3 Frequency distribution, histogram Open a new Excel workbook. Use MegaStat|Generate random Numbers Number of values: 600 Decimal places: 2 Use fixed values Select a distribution and specify the required inputs Determine the appropriate interval width and set up the interval Use MegaStat|Frequency Distributions | Quantitative (specify Histogram, Polygon, and Ogive). The ogive plots the cumulative percents. It can be used to estimate quartiles. Exercises: Ch_03_Frequency_dist,xls in the exercise folder of the CD. 3.B Capping the top interval Go to GPAdata.xls and use MegaStat to find the histogram. Compare your histogram to that in the Capped Top Interval. 3.C Estimating the Median and Quartiles from a Frequency Distribution 1 n CF Interpolated Median = L w 2 f Where: L = lower limit of the interval containing the median w = width of interval n = total sample size CF = cumulative frequency below the median interval f = frequency of the median interval Changing 1/2 to 1/4 or 3/4 and L, CF and f, you can calculate quartiles. L w f CF 1 1 n CF 124 38 2 2 Interpolat ed median L w 300 50 344.444 f 27 Try to calculate the Q1 and Q3. Estimating the Median from a Cumulative Distribution (Ogive) Ogive Cumulative Percent 100.0 75.0 50.0 25.0 0.0 150 250 350 Price About 345 450 550