Docsity

Appunti STATISTICS -IPLE, Dispense di Statistica

Toggle sidebar
bg1
Bianca Beretta IPLE 2023-2024 first trimester
1
STATISTICS
Introduction
• Data: the observations gathered on the characteristics of interest
• Descriptive statistics summarize the information in a collection of data
o It reduces the data to a simpler and more understandable form (graphs, tables, numbers)
o It’s useful when data are available for the entire population
• Inferential statistics provide predictions about a population based on data from a sample of that
population
o It uses the data to make predictions
o It applies when data is available only for a sample
Sampling and Measurement
Measurement
• Measurement: the task of gathering information that characterizes or represents a social
phenomena
• Examples: people’s opinions on gun control, an individual’s income, the severity of unemployment
in a country, the typical wages offered in a given industry…
Ways to measure
Topic: opinion on gun control
Option #1: in-depth interview
• Spend 4 hours interviewing each person, transcribe 25 pages of interview per person, develop a
rich, complex understanding of views
• Advantages: it creates a very detailed knowledge
• Disadvantages: it’s hard to gather information on many people, complexity makes comparison
difficult
Option #2: ask people a very pointed question (yes/no question)
• Advantages: it’s fast and easy (can measure thousands of people), information is in a comparable
form
• Disadvantages: simplification of information, much detail is lost
Units of analysis
• It is the thing which we collect information about
• Common units of analysis are: people, organizations, countries…
Units and scales
• Measurement can involve different units (ex: miles or km)
o In general, differences in this kind of unit are trivial
• Measurement can involve different scales
o Example: the difference between measuring temperature in degrees versus a labeling days
as “hot” and “cold”
• Main types of measurement scales:
o Nominal
o Ordinal
o Interval or ratio
Variables
• Variable: characteristic that can vary in value among subjects in a sample or population
• Quantitative variable: measurement scale has numerical values that represent different
magnitudes of the variable (ex: age, number of siblings)
• Categorical variable: measurement scale is a set of categories (ex: marital status, religion)
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Anteprima parziale del testo

Scarica Appunti STATISTICS -IPLE e più Dispense in PDF di Statistica solo su Docsity!

STATISTICS

Introduction

  • Data: the observations gathered on the characteristics of interest
  • Descriptive statistics summarize the information in a collection of data

o It reduces the data to a simpler and more understandable form (graphs, tables, numbers)

o It’s useful when data are available for the entire population

  • Inferential statistics provide predictions about a population based on data from a sample of that

population

o It uses the data to make predictions

o It applies when data is available only for a sample

Sampling and Measurement

Measurement

  • Measurement: the task of gathering information that characterizes or represents a social

phenomena

  • Examples : people’s opinions on gun control, an individual’s income, the severity of unemployment

in a country, the typical wages offered in a given industry…

Ways to measure

Topic: opinion on gun control

Option #1: in-depth interview

  • Spend 4 hours interviewing each person, transcribe 25 pages of interview per person, develop a

rich, complex understanding of views

  • Advantages: it creates a very detailed knowledge

Disadvantages: it’s hard to gather information on many people, complexity makes comparison

difficult

Option #2: ask people a very pointed question (yes/no question)

  • Advantages: it’s fast and easy (can measure thousands of people), information is in a comparable

form

Disadvantages: simplification of information, much detail is lost

Units of analysis

It is the thing which we collect information about

  • Common units of analysis are: people, organizations, countries…

Units and scales

  • Measurement can involve different units (ex: miles or km)

o In general, differences in this kind of unit are trivial

  • Measurement can involve different scales

o Example : the difference between measuring temperature in degrees versus a labeling days

as “hot” and “cold”

  • Main types of measurement scales:

o Nominal

o

Ordinal

o Interval or ratio

Variables

  • Variable : characteristic that can vary in value among subjects in a sample or population
  • Quantitative variable: measurement scale has numerical values that represent different

magnitudes of the variable (ex: age, number of siblings)

  • Categorical variable: measurement scale is a set of categories (ex: marital status, religion)

Nominal scales

  • Categories are unordered à scale doesn’t have a “high” or “low” end

No category is greater/smaller than any other category

  • Strategy: Assign labels to different cases
  • Examples:

o

Measuring gender: male, female

o Country of residence: US, Japan, Mexico…

o

Religion: Protestant, Catholic, Hindu…

o Country’s regime: democratic vs. non-democratic

Nominal scales involve categories that are:

o Homogeneous à all people in that category must have a commonality

o Mutually exclusive à people can’t fit into more than one category

o Exhaustive à there should be a category for everyone

Problem: Suppose you are interested in measuring “religion”, but a person is both Protestant and Jewish.

What do you do?

Options:

  • Design a better survey that can cope with this (add category for “Protestant/Jewish”, or “multiple

religions”)

  • Destroy information by forcing the person to choose (or by choosing for them)

Ordinal scales

  • Ordinal scales are similar to nominal, but in addition to putting people in groups, those groups are

“ordered”

  • Example: lower class, middle class, upper class

Ordinal scales are:

o Homogeneous

o Mutually exclusive

o

Ordered

  • Ordinal scales don’t specify “distance” between categories

o

Example: Department rankings, we don’t know how big the difference is between ranks of

1 & 2, or 20 and 21 (the difference may be small or large)

Interval scales

  • Possible numerical values for quantitative variables form an interval scale à they have a numerical

distance

Interval scales are:

o Homogeneous

o Ordered

o Measured in comparable units

  • Examples: number of children a person has, budget of a university, worker’s annual income…
  • Interval scales may be “discrete” or “continuous”

o Continuous measures can be measured with arbitrary precision à between any two

possible values there is always another possible value

o Discrete measures can only take on specific values (integers) à basic unit of measurement

that cannot be subdivided

  • Example : Measuring “hours worked per week”

o Is it rounded off to the “hour” – e.g., “42 hours”?

o Or can it be measured with infinite precision: e.g., “41.6890243908432 hours”?

Validity

  • Validity à the degree to which a measurement captures what it is intended to

o If validity is very poor, measurements become meaningless

o

Validity isn’t an “all or nothing” thing

Finite population

  1. Population of inference (PI)
  2. Target population (PO)
  3. Frame population (PC)
  4. Survey population (PE)
  • Other probability sampling methods include systematic, stratified, cluster random sampling
  • For non-probability sampling, cannot specify probabilities for the possible samples à inferences

based on them may be highly unreliable

o Example: volunteer samples, such as polls on the Internet, often are severely biased (but,

sometimes volunteer samples are all we can get, as in most medical studies)

Sampling error

The sampling error of a statistic equals the error that occurs when we use a sample statistic to

predict the value of a population parameter

  • Randomization protects against bias, with sampling error tending to fluctuate around 0 with

predictable size

o We’ll learn methods that let us predict magnitude (the margin of error ) e.g., in estimating a

percentage, no more than about +3% or - 3% when n about 1000

  • Other factors besides sampling error can cause results to vary from sample to sample:

o Sampling bias (ex: non-probability sampling)

o

Response bias (ex: poorly worded questions)

o Nonresponse bias (ex: under coverage, missing data)

Results of surveys can depend greatly on question wording

From measurement to datasets

Suppose we measured 5 people regarding views on gun control and gun ownership:

  1. Choose a unit of analysis
  2. Choose a measurement strategy
  3. Take measurements on relevant cases
  • Result: We end up with sets of measurements on a group of cases

Data is often organized in a spread sheet:

  • Rows contain all measurements on each case

Columns reflect sets of measurements or “variables”

Issue: To facilitate data analysis, it is best to enter data as numbers, rather

than text (often called “coding” data)

Less good option: Use text words “Favor” and “Oppose” in our gun control dataset Better option: Convert

“Favor” and “Oppose” to numeric values

Example: 1 = favor, 0 = oppose

Advantage: more computation options

Disadvantage: Data is harder to interpret by eye

Listing variables

  • Lists : values of a variable for all cases (looking at the “raw data”)
  • List command in STATA
  • Advantages:

o Easy

o Gives a rich description – you can see every case

Disadvantages:

o Cumbersome for large datasets

o If data involves complex coding, you may not be able to interpret it visually

Frequency lists

  • Frequency Lists: tables that show how many cases take on a particular value (frequency

distribution)

  • Examples:

o Congressional vote. How many “Yes” vs

“No”?

o Social class: How many = low, middle,

upper?

o Age: How many = 1 years old, 2 years, ...

100 years?

  • Relevant STATA Command: tabulate (tab)

Advantages:

o Useful for large datasets

o Fairly rich description of data – once you

get used to reading them…

  • Disadvantages:

o Unlike a list, you can’t see which case is which or compare with other variables

o

Best for nominal and some ordinal variables only

o Not useful if all values are unique, such as: rank orderings, many continuous variables

Frequency distribution for categorical data

Bar Chart

Essentially a visual representation of a frequency list

  • Height of bars represent number of cases

For nominal & some ordinal variables only

Pie Chart

Similar, but divides up a circle to show frequency

Frequency distribution for quantitative data

  • Issue: Continuous variables have an infinite possible number of unique values
  • Cases rarely have the exact same value
  • We must use “grouped data”

Sets of similar values must be “grouped”

o Lumped together by constant intervals

o Note: Information is destroyed in the process

  • We use histograms à height of bar represents number of cases within a given range of values

Histograms: interval width

Small interval = more bars in the histogram

  • Wide interval = fewer bars in the histogram
  • WARNING: Histograms look very different depending on how wide you set the intervals
  • Changing the number of “bars” in the histogram alters the appearance of the graph

o Wide intervals/few bars results in greater simplification of data

  • STATA command

o histogram age, discrete width (5)

o histogram age, discrete width (10)

o histogram age, discrete width (1)

Measures of central tendency

  • Often, it is important to assess the “typical” values of a variable
  • Examples:

o

We may wish to know how much money the typical family earns

o We may wish to know the age of the typical person in our dataset

The median is the value of the “middle case” à equal number of cases fall higher or lower

  • Advantages:

o Not influenced by unusual peaks

o Useful even in very even distributions

  • Disadvantages:

o

Not useful for data spread in two distinct “clumps”

  • If the number of statistical units n is odd, there is only one central position P = (n + 1) / 2

If the number of statistical units n is even, there are two middle positions: n / 2 and n / 2 + 1

o If the units corresponding to these two positions have the same modality, this modality is

the median; if they have different modalities: the median is indeterminate (if the variable is

ordinal), the median is the average of the two modalities (if the variable is quantitative)

Grouped data

  1. Calculate the value (n+1)/
  2. If the value falls between two contiguous classes x i- 1 - |x i

and x i

  • |x i+

, the separator value of the two

classes (x i

) is chosen as the median

  1. If the cumulative of order (n+1)/2 falls in the i-class of extremes xi-|xi+1 the median is provided by

the following formula:

𝑀𝑒 = 𝑥

!

!

"

$% #$%

&

Quantiles

  • General term is quantile (ex: percentiles, quartiles, deciles…)
  • Quantiles: dividing cases up into fixed number of equal “bunches”

o

100 chunks = percentiles

o 10 chunks = deciles

o

5 = quintiles

o 4 = quartiles

Upper and lower bounds of quantiles are useful reference points that describe your data

o The border of the 2

nd

and 3

rd

quartile is the median, the middle of your data

o Sometimes people report “ interquartile range ”à the range of values that contains the

middle 50% of cases

Example: number of CD’s owned (N = 12)

  • Identifying quartile of a case is a powerful way of describing where a case falls relative to others

o A person with 200 CDs is in the top quartile à 75% have less

Useful questions that quantiles help answer:

  1. How does a particular case compare to others in the dataset?

o Example: I scored 57 on a test... is that good?

o

Strategy: Determine the percentile

o If 57 corresponds to the 22

nd

percentile, then the answer is NO!, at least not compared to

the others who took the test

  1. How does a case’s value on one variable compare to another variable?

o If I scored 51 on my math test and 78 on my English test, which is better?

o Converting to percentiles allows a direct comparison

§ Ex: 51 on math = 95

th

percentile; 78 on English = 62

nd

§ Conclusion: Math performance was better!

Boxplots

pth percentile: p percent of observations below it, (100 - p )% above it

o p = 50 à median (if it is at the middle of the box, it means that the distribution is

symmetrical)

o

p = 25 à lower quartile (LQ)

o p = 75 à upper quartile (UQ)

Interquartile range IQR = UQ - LQ

  • Quartiles are portrayed graphically by boxplots
  • Box plots have box from LQ to UQ, with median marked
  • They portray a five-number summary of the data:

o Minimum, LQ, median, UQ, maximum except for outliers

identified separately

  • Outlier = observation falling

o Below LQ - 1,5(IQR)

o Above UQ +1,5(IQR)

  • Example : If LQ = 2, UQ = 10, then IQR = 8 and outliers above 10 +1,5(8) = 22

Mean

  • The most well-known way of assessing the “middle”
  • Calculated by adding values of all cases, then dividing by the total number of cases
  • Advantages:

o Useful for continuous measures

o Not overly influenced by any single peak

Disadvantages:

o Can be influenced by extreme values

Calculating the mean: variables

  • Each column of a dataset is considered a variable
  • We’ll refer to a column generically as “Y”

The mean and extreme values

  • Extreme values affect the mean a lot

Very different groups can have the same mean

Mean and median

  • For symmetric distributions, mean = median
  • For skewed distributions, mean is drawn in direction of longer tail , relative to median
  • Mean valid for interval scales, median for interval or ordinal scales
  • Mean sensitive to “outliers” (median often preferred for highly skewed distributions)
  • When distribution symmetric or mildly skewed or discrete with few values, mean preferred

because uses numerical values of observations

Skewness

Skewness refers to the symmetry of a distribution

  • A “tail” is referred to as “skewness"

o Tail on left à skewed to left = negative skew

o Tail on right à skewed to right = positive skew

o Perfectly symmetrical distributions have no skew

  • Interpretation: the side of the distribution with the tail has

fewer cases

  • More cases are on the other side of the mean...
  • Skewness provides information about inequality

o Example: Economic wealth of nations

Interpreting skewness

  • Skewness provides information about inequality in your data

Skewness may reflect “floor” or “ceiling” effects

  • Example : Number of crimes committed by individuals in a sample

o Lower bound is zero. Mode is low. Few cases are high. Variable is skewed to right

  • Example : Country school enrollment ratio

o Cannot exceed 100% enrollment in school

Calculating skewness

  • Often skewness is merely used descriptively

Statisticians have created a measure

o Zero = perfectly symmetrical

o Higher number = increasing skew

  • Based on distance from mean to median à 𝑠𝑘𝑒𝑤 =

'(Ȳ$*+,)

.

&

Remember, mean moves more if there are extreme cases, as when there is a “tail”

  • Skewness is often assessed informally “by eye” rather than calculated as a value

o Look at a histogram to identify skewness

  • Some statistical techniques work properly only on variables that are not skewed

o Thus, it can be very important to identify highly skewed variables

Properties of the mean

  • The mean takes into account the value of every case to determine what is “typical”

o In contrast to the mode & median

o Probably the most commonly used measure of “central tendency”

Disadvantages

o Every case influences outcome... even unusual ones

o Extreme cases affect results a lot

o The mean doesn’t give you any information on the shape of the distribution

§ Cases could be very spread out, or very tightly clustered

  1. The arithmetic mean of a variable is always included between the minimum value and the

maximum value assumed by the variable itself, that is 𝒙

𝒎𝒊𝒏

𝒎𝒂𝒙

  1. The average of a constant is equal to the constant itself, furthermore if a variable X is multiplied by

a constant its average is also multiplied by the same constant, that is 𝑴

  1. The algebraic sum of the deviations of the x i

values from their arithmetic mean is equal to zero

𝒊

B

𝒏

𝒊 4 𝟏

𝒊

B

B

B

𝒏

𝒊 4 𝟏

  1. The sum of squares of the deviations of xi values from their arithmetic mean is minimal (least

squares property)

𝒊

− 𝒙B)

𝟐

𝒏

𝒊 4 𝟏

Example: property 2

The persons listed in the table are a work team: if they realize a project, they will receive a fixed price of

1000€ each and an increase of 5% wage. What will be the average salary earned by members of the team if

you can carry out the project?

Theorems of the mean (1)

The arithmetic mean of k subgroup (of k subpopulation) for each of which is already known the value of the

arithmetic mean, it is equal to the weighted arithmetic mean of the average of the individual groups.

Example

k = 4 degrees; X = age

Theorems of the mean (2)

The arithmetic mean of the sum (or difference) of two (or more variables) is equal to the sum (or

difference) of the arithmetic mean of the individual variables.

Example

The table shows the travel time (in minutes) to reach the workplace (X) and the trave time by public

transport (Y) of 5 individuals.

Calculate the overall average travel time to reach the workplace.

Example: review of theorems

The table shows the travel times in minutes for 10 Frecciarossa Italia trains on the Rome-Bologna and

Bologna-Milan routes, indicated respectively with X and Y.

Knowing that the theoretical travel time of the entire journey, RM-MI, is equal to 270 minutes, indicate

with W the variable “total delay reported by the trains”. Calculate the overall mean delay for Roma-Milano.

Shannon’s diversity index (entropy)

>

= − X 𝑓

!

log(𝑓

!

  • In case of minimum heterogeneity it’s equal to 0
  • In case of maximum heterogeneity it’s equal to log(K)
  • Normalized index (range between 0 and 1)

.

!'()

!

log(𝑓

!

log(𝐾)

QUANTITATIVE VARIABLE: GLOBAL VARIABILITY

  • Interquartile range IQR = Q 3

- Q

1

  • Range K = xmax - xmin

Minimum and maximum

  • Minimum: the lowest value of a variable represented in your data
  • Maximum: the highest value of a variable represented in your data

They are affected by outliers

  • Example : In previous histograms about number of CDs owned, the minimum was 0, the maximum

was 20 0

Range

  • The range is calculated as the maximum minus the minimum

o

In case of CD ownership, 200 - 0 = 200

  • Advantage: easy
  • Disadvantage:

o Easily influenced by extreme values à may not be representative

o Doesn’t tell you anything about the middle cases

Dispersion

Interpreting dispersion

Question: What are possible social interpretations of the different distributions (all with the same mean)?

  • Example 1: Individuals cluster around 100
  • Example 2: Individuals distributed sporadically over range 0- 200
  • Example 3: Individuals in two groups – near zero and near 200

Measures of dispersion

  • Remember: the goal is to understand your variable à the center of the distribution is only part of

the story

  • Important issue: How “spread out” are the cases around the mean?

o How “dispersed”, “varied” are your cases?

o Are most cases like the “typical” case? Or not?

  • Some measures of dispersion:

o Average absolute deviation

o Variance

o Standard deviation

o

Coefficient of variation

Idea of deviation

  • Deviation: how much a particular case differs from the mean of all cases
  • Deviation of zero indicates the case has the same value as the mean of all cases

Positive deviation : case has higher value than mean

  • Negative deviation : case has lower value than mean

Extreme positive/negative indicates cases further from mean

Deviation of a case

  • Formula: 𝒅 = 𝒀

𝒊

B

It’s the distance from the mean (Y-bar) à difference between each observation and the mean

  • The sum of deviations with respect to the mean is always 0 (for compensations) – otherwise you

cannot measure the variability

Example

Turning the deviation into a useful measure of dispersion

Idea #1: Add it all up

The sum of deviation for all cases: ∑ 𝑑

!

%

! 4 #

  • What is sum of the following?

o 12.5, 7.5, - 32.5, 37.

  • Problem: sum of deviation is always zero

o Because mean is the exact center of all cases

o Cases equally deviate positively and negatively

o Conclusion: You can’t measure dispersion this way

Idea #2: Sum up “absolute value” of deviation

  • Absolute value makes negative values positive (designated by vertical bars): ∑ |𝑑

!

%

! 4 #

  • What is sum of 12.5, 7.5, - 32.5, 37.5?
  • Answer: 90 à these 4 cases deviate by 90 cds from the mean
  • Problem: Sum of Absolute Deviation grows larger if you have more cases

o Doesn’t allow comparison across samples

Idea #3: The Average Absolute Deviation

  • Calculate the sum, divide by total N of cases: 𝐴𝐴𝐷 =

∑ |

|

#+%

%

∑ | A

$A

B |

#+%

%

  • Gives the deviation of the average case

Digression: Here we have used the mean to determine “typical” size of case deviations

Originally, I introduced the mean as a way to analyze actual case values (e.g. # of CDs owned)

  • Now: Instead of looking at typical case values, we want to know what sort of deviation is typical

o In other words a statistic, the mean, is being used to analyze another statistic – a deviation

This is a general principle that we will use often: statistics can help us understand our raw data and

also further summarize our statistical calculations!

Average absolute deviation

  • Example: Total Deviation = 90, N=

o What is Average absolute deviation? 22.

  • Advantages à very intuitive interpretation: it tells you how many cases differ from the mean, on

average

  • Disadvantages à it has non-ideal properties, according to statisticians

Turning the deviation into a useful measure of dispersion

Idea #4: Square the deviation to avoid problems of negative values

  • variance à sum of “squared” deviation divided by “N-1” (instead of N) to get the average

Properties of the variance

  1. The variance of a constant is 0 à 𝑉(𝑎) = 0
  2. It is invariant for translation, i.e. if at each x i

a constant quantity is added, the variance does not

change à 𝑉(𝑋 + 𝑎) = 𝑠

;

7

  1. If every x i

is multiplied by a constant b, the variance is multiplied by the constant b in square à

7

Variance: theorem 1

The variance of a mixture of k groups (or subpopulations), for each of which the variance value is already

known, is equal to the sum of two variances, that is: 𝑠

7

D

7

E

7

  • Total variance is the sum of the within variance and the between variance

Within variance à the mean of the group variance (use formula of the mean applied to the variances)

D

7

X 𝑠

!

7

!

8

! 4 #

Between variance à the variance of the group mean (use formula of the variance applied to the means)

E

7

X(𝑥̅

!

7

!

8

! 4 #

Variance: theorem 2

The variance of the sum (or difference) of two variables is equal to the sum of variances of the individual

variables only if they are independent à if the increase of X doesn’t produce a change in Y (or vice versa),

the variance of Z is equal to the sum of the variance of X and the variance of Y

  • If X and Y are independent: 𝑉(𝑍) = 𝑉(𝑋 + 𝑌) = 𝑉 + 𝑉(𝑌)
  • If X and Y are dependent: 𝑉(𝑍) = 𝑉(𝑋 + 𝑌) = 𝑉(𝑋) + 𝑉(𝑌) + 2 𝐶𝑂𝑉(𝑋, 𝑌)

Z-scores

Z-Score: standardized score

  • It's a transformation of a continuous variable
  • The Z-score: another way to assess relative placement of cases in a distribution

o

Somewhat like a deviation

  • You can convert any or all values of a variable to a common scale
  • Running approximately from – 3 to +3 , with mean = 0
  • Then you can easily compare across variables

o Ex: I’m a - .3 on math, a +1.2 on reading

o Negative = below mean, positive = above mean

Formula for Z-Score

  • For any case in you data, calculate: 𝒁

𝒊

𝒅

𝒊

𝒔

𝒀

(𝒀

𝒊

$𝒀

I )

𝑺

𝒀

  • Start with the a cases value (Yi)... Then simply subtract the mean and divide by the standard

deviation

Z-Score example

  • Example: In the US, the mean level of education is 13 years, with a S.D. of 3 years

Question 1: What is the Z-score of a person who has a high-school degree? (12 yrs)

!

!

A

!

o

)

A

Question 2: What is the Z-score of an advanced graduate student? (22 yrs)

!

!

A

!

o

)

A

Properties of Z-Scores

  • Z-scores are like deviations

o Cases on the mean score zero

o Positive values are above mean, negative below

  • But, like quantiles, Z-scores can be compared across variables with different units or means

o

Simple deviations can’t be compared if units of measurement are different (ex: height and

weight)

  • Units of Z-scores are “standard deviations”

o A Z-score of - 1.83 indicates a case is nearly 2 standard deviations below the mean

Z-scoring whole variables

  • You can convert an entire variable (all cases) to Z-scores, creating a whole new variable

o With useful properties

  • Converting to Z-scores preserves the shape of the distribution

o But, mean and standard deviation are altered

Mean = zero

o Because it is based on deviations

  • Standard Deviation (s y

o

Because distance from mean = divided by sy

Z-Score example

Number of CDs: mean = 32,5 s = 29,

Z-Scoring whole variables

  • Properties of Z-scored variables
  1. Mean=0 ,S.D.=

o

Unit of variable is literally “standard deviations”

o If a value = 1, it means the cases is 1 S.D above mean

  1. Z-scored variables are useful for comparing variables with very different units
  2. However, the actual meaning of units is lost

o Ex: a variable measured in # of CDs makes sense, but a variable in # of S.D.s is harder to

interpret

Z-Scores and index construction

Issue: It is often useful to combine several variables to create an “index”

  • Example: Suppose you ask several similar questions on a survey (all on a scale from 1-5):

o Do you approve of President’s foreign policy?

o Do you approve of the President’s domestic policy?

o Do you approve of the President’s character?

  • You can add all 3 together to make a scale from that reflects “overall approval” of Bush

o For each individual, the scale goes from 3 to 15

The function {𝑥, 𝑓(𝑥)} with 𝑓(∙) ≥ 0 is said density function and it is such that:

;

$K

and ∫ 𝑓

K

$K

= 1 where 𝑃(𝑋 ≤ 𝑥) represents the area under the curve 𝑓(∙) to the

point x, that is, cumulative distribution function

For continuous random variables P (X=x)=0, the possible cases are infinite and therefore

!

Exercise

Consider two 3-sided dice and the random variable ’Sum of the two dice’. Build the random variable X

  • Calculate M(X) and V(X) à [E(X) expected value instead of M(X)]

Bernoullian Experiment

It is random experiment consisting of a set of n repeated tests with the following characteristics:

  1. At every single test, there are only two possible outcomes, 'success' and 'failure’
  2. The probability p of success is constant
  3. The trials are independent

n=1 à Bernoulli random variable

n>1 à Binomial random variable

Bernoulli random variable

  • Discrete random variable assuming only 2 values (0 and 1) with probabilities respectively (1-p)

and p with **_0 Example: Binomial random variable

Given a deck of 52 cards, you draw 5 cards with replacement and consider the variable: X=number of hearts

cards.

a) Which variable is?

#'

L

€ à 𝑋 ≈ 𝐵𝑖𝑛( 5 , 0. 25 )

b) Probability of pulling 3 hearts?

Z

\

'

L$'

'

7

c) Probability to extract at least 3 hearts?

L

'

'

7

L

M

M

L

L

L

N

d) Probability to pull out at 3 hearts

[𝑃

] = 1 − [ 0. 0146 + 0. 001 ] = 0. 984 = 98 .4%

e) Probability of not pulling hearts

L

N

N

L

f) Probability of extracting at least 1 heart

Gaussian or Normal random variable

  • It is a continuous random variable that assumes all real numbers , it is defined by the following

density function:

O√ 7 Q

$

(/$ 0 )

"

" 2

"

It is symmetrical with respect to x= μ

(symmetry point: mean, mode and median coincide)

  • It assumes maximum value for x=μ

It is asymptotic with respect to the abscissa axis

  • It has two flexes at points x 1 =μ-s and x 2 =μ+s

68% of cases is in the range mean ± standard deviation

  • 95% of cases is in the range mean ± 2 standard deviation

99% of cases is in the range mean ± 3 standard deviation

Shape indicators

Kurtosis

Skewness

Z-scores formula

𝑿$𝝁

𝝈

  • The mean of Z is 0 and the variance of Z is 1
  • This procedure is used to compare different distributions