投影片 1

advertisement

Chapter 2: Descriptive Statistics

Adding MegaStat in Microsoft Excel 2010 http://blog.wentoday.com/?p=640

2.1 Measures of Central Tendency

Mode: The most frequently occurring number

Learning Activity 2.1-1 Calculate the mode

• Open Price.xls!Data_sorted

• Use the Excel MODE() function

• Mode_Solution

Learning Activity 2.1-2

• Open Bedrooms.xls!Data_sorted

• Use the Excel MODE() function

• Mode_Solution

Median and Quartiles

Median: the middle number of a set of data

Learning Activity 2.1-3 Calculate the median

• Open Price.xls!Data_sorted.

• Find the median by taking the mean of the middle two numbers.

• Use the Excel MEDIAN() function.

• Use MegaStat|Descriptive Statistics.

• Median_Solution

Learning Activity 2.1-5 Calculate the quartiles

• Open Quartiles.xls!Data.

• Use MegaStat|Descriptive Statistics

• Use Excel’s QUARTILE() function.

• Sort the Price variable (ascending) and verify the 1st quartile

is between 31st and 32nd values (1/4 of the values are below)

and the 3rd quartile is between 93rd and 94th values.

Mean

Graphical Representation of the Mean

Data representation of Mean1.xls

4, 4, 6, 2, 5, 9, 5, 7, 5, 2, 14, 7, 14, 7, 7, 2, 9, 8

The mean as the center of mass

Outliers

Q1 = 25th percentile (the value below which 25% of

the data fall)

Q3 = 75th percentile

H = Q3 – Q1 (the interquartile range, a measure of dispersion)

An outlier is defined as any value less than Q1 – 1.5*H

Or greater than Q3 + 1.5*H.

An extreme outlier is defined as any value less than

Q1 – 3.0*H or greater than Q3 – 3.0*H.

( http://www.itl.nist.gov/div898/handbook/prc/section1/prc16.htm

)

Note: To use this rule, you assumed your data are

normally distributed.

Learning Activity 2.1-7 Outliers, mean and median

• Open Dataset1.xls!Data

• Use MegaStat|Descriptive Statistics

specify A3:B27 as the input range

select Definitional form and “Median and Quartiles.”

2.2 Measure of Variatiion

Range, Mean Deviation, and Mean Absolute Deviation

Learning Activity 2.2-1, -2, & -3

• Open Mean1.xls!Data.

• Calculate Min(), Max() and range

• Calculate Mean deviation

• Calculate Mean absolute deviation (MAD) (use =ABS()).

Variance and Standard Deviation

Population variance =

σ

Sample variance = s 2 =

2 =

( X i

N

( X n i

1

X ) 2

µ ) 2

=

SSX df df =

∑ deg rees of

2 freedom

Learning Activity 2.2-5 Calculate variation by using Excel and

Megastat

• Open • Open Stdev2.xls!Data..

In cells F21:F23 use DEVSQ(), VAR(), and STDEV() to

calculate SSX, variance and s.d., respectively.

Learning Activity 2.2-6

• Open Stdev3.xls!Data

.

• Copy/Paste F2:F19 into B2:B19

• Do the same for other data

Learning Activity 2.2-7 Graphical interpretation of S. D.

• Open GraphicSD.xls!Data

.

Sample MegaStat Output

Learning Activity 2.3-1 Descriptive Statistics

• Open Variation.xls!Data.

Use MegaStat|Dexcriptive Statistics, specify B3:C13 as the input range and select Median...and SSX.

Scatterplot

Learning Activity 2.4-3

• Open RealEstateData.xls!Data.

• Use MegaStat | Correlation/Regression | Scatterplot.

Use SqrFt as the horizontal axis and Price the vertical.

Uncheck the “Plot linear regression line” box. Put a

title in the title box.

• Redo the previous step, checking the “Plot linear

regression line” box.

Download