DOC PREVIEW
UNC-Chapel Hill BIOS 662 - Descriptive Statistics

This preview shows page 1-2-3-4-26-27-28-53-54-55-56 out of 56 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Descriptive Statistics Bios 662 Michael G Hudgens Ph D mhudgens bios unc edu http www bios unc edu mhudgens 2006 08 23 11 13 BIOS 162 1 Descriptive Statistics Descriptive Statistics Types of variables Measures of location Measures of spread Data displays BIOS 162 2 Descriptive Statistics Types of Variables A variable is a quantity that may vary from object to object A sample or data set is a collection of values of one or more variables Types of variables Qualitative categorical intrinsically nonnumerical e g gender province country Quantitative variable intrinsically numerical e g age height counts BIOS 162 3 Descriptive Statistics Descriptive Statistics Types of variables Measures of location Measures of spread Data displays BIOS 162 4 Descriptive Statistics Measures of Location Arithmetic Mean Percentiles Median Mode Geometric mean BIOS 162 5 Descriptive Statistics Arithmetic mean Data x 1 x2 x n Mean n X 1 x1 x2 xn x n n BIOS 162 6 xi i 1 Descriptive Statistics Example Duration of hospital stay in days x1 5 x2 10 x3 6 x4 11 Mean BIOS 162 1 32 x 5 10 6 11 8 4 4 7 Descriptive Statistics Reporting of decimals Report mean with one more significant digit than the observations Example If x is measured in whole numbers and x 6 345 report x 6 3 BIOS 162 8 Descriptive Statistics Properties of Mean Let c be any constant If yi xi c for i 1 2 3 n then y x c If yi cxi for i 1 2 3 n then y cx BIOS 162 9 Descriptive Statistics Properties of Mean Example A sample of birth weights in a hospital found y 3166 9 grams 1 oz 28 35 g Therefore the mean in ozs is y x 111 7 28 35 BIOS 162 10 Descriptive Statistics Order statistics Data x1 x2 xn Order data from smallest to largest x 1 x 2 x n x 1 x 2 x n are order statisitics Note x 1 min x1 x2 xn x n max x1 x2 xn BIOS 162 11 Descriptive Statistics Example Duration of hospital stay in days x1 5 x2 10 x3 6 x4 11 Order statistics x 1 5 x 2 6 x 3 10 x 4 11 BIOS 162 12 Descriptive Statistics Percentiles Intuitive definition the x percentile is such that x of the observations are less than that value Also known as sample quantile BIOS 162 13 Descriptive Statistics Percentiles Text definition The p 100 th percentile of a sample if np p is an integer y np p p y bnp pc y dnp pe 2 otherwise for 0 p 1 Note byc is the greatest integer y i e the floor function dye is the smallest integer y i e the ceiling function Cf Def 3 11 of text BIOS 162 14 Descriptive Statistics Percentiles General form General form Hyndman and Fan Am Stat 1996 p 1 y j y j 1 where j m j m 1 p n n and j bpn mc for some m R and 0 1 Let g pn m j and be a function of g and j BIOS 162 15 Descriptive Statistics Percentiles General form If m p and 0 if g 0 1 2 if g 0 then j bpn pc and we recover text definition BIOS 162 16 Descriptive Statistics Percentiles Software SAS Proc Univariate 5 definitions of percentile R 9 definitions Claim none of these match the book definition BIOS 162 17 Descriptive Statistics R quantile function quantile quantile package stats R Documentation Sample Quantiles Description The generic function quantile produces sample quantiles corresponding to the given probabilities The smallest observation corresponds to a probability of 0 and the largest to a probability of 1 Usage quantile x Default S3 method quantile x probs seq 0 1 0 25 na rm FALSE names TRUE type 7 Arguments BIOS 162 18 Descriptive Statistics x numeric vectors whose sample quantiles are wanted probs numeric vector of probabilities with values in 0 1 na rm logical if true any NA and NaN s are removed from x before the quantiles are computed names logical if true the result has a names attribute FALSE for speedup with many probs Set to type an integer between 1 and 9 selecting one of the nine quantile algorithms detailed below to be used further arguments passed to or from other methods Types quantile returns estimates of underlying distribution quantiles based on one or two order statistics from the supplied elements in x at probabilities in probs One of the nine quantile algorithms discussed in Hyndman and Fan 1996 selected by type is employed BIOS 162 19 Descriptive Statistics Percentiles Class Definition The p 100 th percentile of a sample if np is not an integer y bnpc 1 p y np y np 1 2 if np is an integer for 0 p 1 Defintion 2 of R Hyndman and Fan m 0 and 1 if g 0 1 2 if g 0 Defintion 5 of SAS BIOS 162 20 Descriptive Statistics Example Suppose n 278 and we want the 75th percentile np 278 75 208 5 such that 75 x 209 BIOS 162 21 Descriptive Statistics Median The sample median is the 50th percentile if n is odd y n 1 2 5 y n 2 y n 2 1 2 if n is even for 0 p 1 BIOS 162 22 Descriptive Statistics Example Duration of hospital stay in days x1 5 x2 10 x3 6 x4 11 Median 5 x 2 x 3 2 6 10 2 8 BIOS 162 23 Descriptive Statistics Mode The mode is the most frequently occurring value in the data set In the hospital stay example there is no mode since all values occur equally often BIOS 162 24 Descriptive Statistics Geometric Mean Data x1 x2 xn Let yi log xi for i 1 2 n The geometric mean of x is x g exp y x1x2 xn 1 n x g is used when data are of the form ck Note one can use any base for the logarithm BIOS 162 25 Descriptive Statistics Comments Mean is most often used measure Median is better if there are influential observations more robust to outliers If distribution is symmetric mean equals median Mode rarely used BIOS 162 26 Descriptive Statistics Example Duration of hospital stay in days x1 5 x2 10 x3 6 x4 11 5 x 8 Alter last observation x1 5 x2 10 x3 6 x4 50 5 8 x 17 7 BIOS 162 27 Descriptive Statistics Measures of Spread Range Variance and standard deviation Interquartile range BIOS 162 28 Descriptive Statistics Descriptive Statistics Types of variables Measures of location Measures of spread Data displays BIOS 162 29 Descriptive Statistics Range Range ra x n x 1 Easy to calculate Sensitive to unusual observations outliers Usually the larger n is the larger ra BIOS 162 30 Descriptive Statistics Sample Variance and Standard Deviation Want to measure deviation from mean Sample variance n n X X 1 1 xi x 2 x2i nx 2 s2 n 1 n 1 i 1 i 1 …


View Full Document

UNC-Chapel Hill BIOS 662 - Descriptive Statistics

Download Descriptive Statistics
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Descriptive Statistics and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Descriptive Statistics 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?