## Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

:

Variables and Distribution

Goals

Describe the steps of descriptive data analysis Be able to define variables Understand basic coding principles Learn simple univariate data analysis

Types of Variables Continuous variables: Always numeric Can be any number. concentrations of pollutants and other measurements Information that can be sorted into categories Types of categorical variables – ordinal. nominal and dichotomous (binary) Categorical variables: . temperature. weight. positive or negative Examples: age in years. blood pressure readings.

strongly agree) Rating (excellent. college degree) Agreement (strongly disagree. fair. agree. some college. often. sometimes. poor) Frequency (always. HS degree. disagree. never) Any other scale (―On a scale of 1 to 5.‖) . neutral...Categorical Variables: Ordinal Variables Ordinal variable—a categorical variable with some intrinsic order or numeric value Examples of ordinal variables: Education (no high school degree. good.

White.S. Asian American) Favorite pet (dog. South. (Northeast. fish. Midwest. female) Nationality (American. Hispanic.Categorical Variables: Nominal Variables Nominal variable – a categorical variable without an intrinsic order Examples of nominal variables: Where a person lives in the U. snake) . French) Race/ethnicity (African American. Mexican. etc. cat.) Sex (male.

Categorical Variables: Dichotomous Variables Dichotomous (or binary) variables – a categorical variable with only 2 levels of categories Often represents the answer to a yes or no question ―Did you attend the church picnic on May 24?‖ ―Did you eat potato salad at the picnic?‖ Anything with only 2 categories For example: .

or F Coding will avoid such inconsistencies . Female.Coding Coding – process of translating information gathered from questionnaires or other sources into something that can be analyzed Involves assigning a value to the information given—often value is given a label Coding can make data more consistent: Example: Question = Sex Answers = Male. M.

1=Yes but in second example 1=No As long as it is clear how the data are coded. Yes= label of value) OR: 1=No 2=Yes When you assign a value you must also make it clear what that value means In first example above. either is fine You can make it clear by creating a data dictionary to accompany the dataset .Coding Systems Common coding systems (code and label) for dichotomous variables: 0=No 1=Yes (1 = value assigned.

male/female.Coding: Dummy Variables A ―dummy‖ variable is any variable that is coded to have 2 levels (yes/no.) Dummy variables may be used to represent more complicated variables Example: # of cigarettes smoked per week--answers total 75 different responses ranging from 0 cigarettes to 3 packs per week Can be recoded as a dummy variable: 1=smokes (at all) 0=non-smoker This type of coding is useful in later stages of analysis . etc.

Coding: Attaching Labels to Values Many analysis software packages allow you to attach a label to the variable values Makes reading data output easier: Without label: Variable SEX 0 1 Variable SEX Male Female Example: Label 0’s as male and 1’s as female Frequency 21 14 Frequency 21 14 Percent 60% 40% Percent 60% 40% With label: .

Ordinal Variables Coding process is similar with other categorical variables Example: variable EDUCATION. possible coding: 0 1 2 3 = = = = Did not graduate from high school High school graduate Some college or post-high school education College graduate Could be coded in reverse order (0=college graduate.Coding. 3=did not graduate high school) For this ordinal categorical variable we want to be consistent with numbering because the value of the code assigned has significance .

Coding – Ordinal Variables (cont.) Example of bad coding: 0 1 2 3 = = = = Some college or post-high school education High school graduate College graduate Did not graduate from high school Data has an inherent order but coding does not follow that order—NOT appropriate coding for an ordinal categorical variable .

Coding: Nominal Variables For coding nominal variables. no ordered value associated with each response . order makes no difference Example: variable RESIDE 1 2 3 4 5 = = = = = Northeast South Northwest Midwest Southwest Order does not matter.

Coding: Continuous Variables Creating categories from a continuous variable (ex. age) is common May break down a continuous variable into chosen categories by creating an ordinal categorical variable Example: variable = AGECAT 1 2 3 4 5 = = = = = 0–9 years old 10–19 years old 20–39 years old 40–59 years old 60 years or older .

―symptoms stopped.‖ and ―illness didn’t last very long‖ Could all be grouped together as ―illness was not severe‖ Typically.) May need to code responses from fill-in-the-blank and open-ended questions Example: ―Why did you choose not to see a doctor about this illness?‖ One approach is to group together responses with similar themes Example: ―didn’t feel sick enough to see a doctor‖. ―don’t know‖ is coded as 9 Also need to code for ―don’t know‖ responses‖ .Coding: Continuous Variables (cont.

before you gather any data. you should think about how you are going to code while designing your questionnaire.Coding Tip Though you do not code until the data is gathered. This will help you to collect the data in a format you can use. .

Data Cleaning One of the first steps in analyzing data is to ―clean‖ it of any obvious data entry errors: Outliers? (really high or low numbers) Example: Age = 110 (really 10 or 11?) Value entered that doesn’t exist for variable? Example: 2 entered where 1=male. 0=female Missing values? Did the person not give an answer? Was answer accidentally not entered into the database? .

limiting words that can be entered.Data Cleaning (cont..g. or missing are acceptable values Many data entry systems allow ―double-entry‖ – ie.) May be able to set defined limits when entering data Limits can be set for continuous and nominal variables Prevents entering a 2 when only 1. entering the data twice and then comparing both entries for discrepancies Univariate data analysis is a useful way to check the quality of the data Examples: Only allowing 3 digits for age. formatting dates as mm/dd/yyyy or specifying numeric values or text) . assigning field types (e. 0.

etc.Univariate Data Analysis Univariate data analysis-explores each variable in a data set separately Frequencies can tell you if many study participants share a characteristic of interest (age. gender.) Serves as a good method to check the quality of the data Inconsistencies or unexpected results should be investigated using the original data as the reference point Graphs and tables can be helpful .

) Examining continuous variables can give you important information: Do all subjects have data. or are values missing? Are most values clumped together. or could there be mistakes in the coding? . or is there a lot of variation? Are there outliers? Do the minimum and maximum values make sense.Univariate Data Analysis (cont.

the number where half of the values are above and half are below Mode – the value that occurs the most times Range of values – from minimum value to maximum value .) Commonly used statistics with univariate analysis of continuous variables: Mean – average of all values of this variable in the dataset Median – the middle of the distribution.Univariate Data Analysis (cont.

Statistics describing a continuous variable distribution Example Scatter Chart: Age 90 84 = Maximum (an outlier) 80 70 60 Age (in years) . 50 36 = Median (50th Percentile) 33 = Mean 40 30 28 = Mode (Occurs twice) 20 10 2 = Minimum 0 .

50 40 30 20 10 0 Figure left: narrowly distributed age values (SD = 7.Standard Deviation Example Scatter Chart 2: Age 90 80 70 60 50 40 30 20 10 0 Example Scatter Chart 1: Age 90 80 70 60 Age (in years) . Age (in years) .6) Figure right: widely distributed age values (SD = 20.4) .

or grouped in the middle Percentiles – the percent of the distribution that is equal to or below a certain value 25th Percentile (4 years) Frequency 10 8 6 4 2 0 1 2 3 4 5 6 7 8 9 10 11 Age (years) Frequency Distribution Example 2 14 12 Frequency 10 8 6 4 2 0 1 2 3 25th Percentile (6 years) 4 5 6 7 8 9 10 11 Age (years) . high in the range.Distribution and Percentiles Distribution – Distribution curves for variable AGE Frequency Distribution Example 1 14 12 whether most values occur low in the range.

Analysis of Categorical Data Distribution of categorical variables should be examined before more indepth analyses Number of people answering example questionnaire who reside in 5 regions of the United States Distribution of Area of Residence Example Questionnaire Data 30 Number of People 25 20 15 10 5 0 Midwest Northeast Northwest variable: RESIDE South Southwest Example: variable RESIDE .

Analysis of Categorical Data (cont.) Another way to look at the data is to list the data categories in tables Table shown gives same information as in previous figure but in a different format Table: Number of people answering sample questionnaire who reside in 5 regions of the United States Frequency Percent Midwest Northeast Northwest South Southwest Total 16 13 19 24 8 80 20% 16% 24% 30% 10% 100% .

from the US Census US Population aged 20 Years Bureau or Older 35 30 25 20 15 10 5 0 Less than high school High school graduate Some college College graduate Percent Are the observed data really that different from the expected data? Answer would require further exploration with statistical tests variable: EDUCATION .Observed vs. Expected Distribution Education variable Distribution of Education Level Observed dataExample on level Questionnaire of education Data from a hypothetical questionnaire 35 30 25 20 15 10 5 0 Less than high school High school graduate Some college College graduate Observed distribution of education levels (top) Expected distribution of education (bottom) (1) Comparing graphs shows a more educated study population than expected Percent variable: EDUCATION Data on the education level of theLevels US population aged 20 Expected Education years or older.

Conclusion Defining variables and basic coding are basic steps in data analysis Simple univariate analysis may be used with continuous and categorical variables Further analysis may require statistical tests such as chi-squares and other more extensive data analysis .

Educational Attainment in the United States: 2003---Detailed Tables for Current Population Report. Available at: http://www. .html. 2006.census.gov/population/www/socdemo/edu cation/cps2003. P20-550 (All Races). Accessed December 11. US Census Bureau.References 1.

- Presentation TA
- G.srinivas-itm-cp
- kel. 7
- LDP_603 Measurement Scales
- Dummy Scales
- Research Instruments
- 4810 data analysis codebook
- The induvudial kontlor charrt
- Correltional Research by qahar
- Anova
- Del
- Slide AKT 405 Teori Akuntansi 5 Godfrey
- Instruments
- 311 data analysis paper final draft
- Unit 10 - Statistics word problems
- Unit 5 Exploratory Data Analysis (EDA)
- New Features in Jmp and Jmp Pro13
- Loan
- assign02 ques03.docx
- 5.Incentive Compatible Privacy-Preserving Data Analysis
- Janina Trans
- Lecture 1 Introd to Stats Adapted
- Statistics Assignment 05
- Empirical
- Visual Rating Wm Changes
- rubric
- Session 8
- Communicating Data as 12.4.4
- Research Methodology Important Question and Answer
- MATHS 3 the Big Debate

Skip carousel

- Tenth-Grade WASL in Spring 2006
- frb_2006comp_p1.pdf
- bls_2050-69_1979.pdf
- wp458
- 2017-land-markets-survey-02-14-2017
- 67649_2010-2014
- The San Francisco Polar Bear Swim Study
- 31081_1995-1999
- 67650_2010-2014
- High Stakes Testing
- frb_2014comp.pdf
- Sugar Land, Texas, household income (2010 ACS)
- AIGA Design Educators Salary Survey
- 31081_1985-1989
- 31081_1980-1984
- bls_2050-47_1979.pdf
- b0096_dolwb_1932
- As ISO 16269.7-2004 Statistical Interpretation of Data Median - Estimation and Confidence Intervals
- frbclv_wp1990-11.pdf
- 58274_1940-1944
- 67651_2010-2014
- 67652_2010-2014
- Fiscal Stress Summary Results School Districts
- Statistical Methods
- scf14
- PA School Funding Racial Bias
- Fed Report Consumer Finances
- State of Texas household income, 2010 (ACS)
- frbclv_wp1993-04.pdf

- Health Research Methodology
- WISN_Eng_UsersManual.pdf
- Cẩm nang YHDP
- [Vocabulary] Eng-Viet Vocab
- Workflow Slides JSLong 110410
- englishformaths-dhsp-100524051732-phpapp01.pdf
- Measles elimination program
- Get Ready for IELTS Reading
- Health Economics for Developing Countries - A Practical Guide 2000
- Thesis Guide
- English for Mathematics
- Sampling and Descriptive Statics
- Useful Stata Commands
- Word Family
- Sample of Report
- SampleSize.tascott.handout
- The Sexual and Reproductive Health of Young Adolescents in Developing Countries
- An Introduction to ROC Analysis

Sign up to vote on this title

UsefulNot usefulRead Free for 30 Days

Cancel anytime.

Close Dialog## Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

Close Dialog## This title now requires a credit

Use one of your book credits to continue reading from where you left off, or restart the preview.

Loading