Docsity

30280 Applications for Management - 1st partial, Appunti di Statistica

Toggle sidebar
bg1
Applications+for+Management+–+1st+partial+
VARIABLES)
• Dependent Variable (Y) à A variable whose observed values
depend on the values of other variables
• Independent Variables (X) à One (or more) variables that are
used to predict values of Y
• Confounding Variable à A variable that might interfere with or
‘confound’ the relationship between the independent and the
dependent variables
• Latent and indicator variables à Latent variables are variables
that are unobserved, but whose influence can be summarized
through one or more indicator variables. They are useful for
capturing complex or conceptual properties of a system that are
difficult to quantify or measure directly.
• Composite scale (summated scale) à Instead of using one single
variable to measure a complex concept, responses to several indicator variables are used to produce a
composite scale. They increase the validity of our measurement; a combination of measures provides more
information and thus a more accurate estimate of the true score of an underlying concept.
Example
For instance, suppose you want to measure attitudes towards having children. As we know, an attitude cannot be observed
in the same way we for instance observe individuals’ income level. However, suppose you have access to the responses to
the following questions:
o “Having a child will limit my employment opportunities”
o “A child will bring joy and satisfaction to my life”
o “Without a child, there will be no-one to care for me in old age”
Further assume that the answers to these questions range from 1: Strongly disagree to 5: Strongly agree.
A composite scale could be constructed from taking the mean of the three questions for each individual.
• Anchored scales à scales in which selected values are named or “anchored” as a guide to the respondent. A
fully anchored scale that ranges from strongly disagree to strongly agree is known as a “Likert scale”.
RESEARCH)PROCESS))
1. Problem definition
a. Selection of a theory or other basis for definition of the specific study à A in-depth literature search has to
be run on recognized sources
b. Identification of the unit of analysis à Individuals, couples, teams, firms…
c. Identification of the fundamental concepts to be studied
d. Expected of proposed relationship between concepts
2. Prepare the design of your study: How do you collect and analyze your data?
a. Omitted variable bias, reverse causality, simultaneity
b. Selection of the statistical technique
c. Definition of the population of interest
d. Measurement of the population (sampling)
3. Identify data sources and collect data
Census à Data are collected from
every member of a population
Sample à the group analyzed, drawn from the population
• Probability sample à random selection so each unit has an equal
chance of being selected
• Convenience sample à the units that are selected for inclusion in
the sample are the easiest to access; we cannot be sure that it will
be a representative sample
• Stratified sample à to cover all parts of the population. For
instance, if we make a sample of individuals of a country, then we
might be interested in well covering all regions in this country
Population à the group of people,
items or units under investigation
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Anteprima parziale del testo

Scarica 30280 Applications for Management - 1st partial e più Appunti in PDF di Statistica solo su Docsity!

Applications for Management – 1

st

partial

VARIABLES

  • Dependent Variable (Y) à A variable whose observed values depend on the values of other variables
  • Independent Variables (X) à One (or more) variables that are used to predict values of Y
  • Confounding Variable à A variable that might interfere with or ‘confound’ the relationship between the independent and the dependent variables
  • Latent and indicator variables à Latent variables are variables that are unobserved, but whose influence can be summarized through one or more indicator variables. They are useful for capturing complex or conceptual properties of a system that are difficult to quantify or measure directly.
  • Composite scale (summated scale) à Instead of using one single variable to measure a complex concept, responses to several indicator variables are used to produce a composite scale. They increase the validity of our measurement; a combination of measures provides more information and thus a more accurate estimate of the true score of an underlying concept. Example For instance, suppose you want to measure attitudes towards having children. As we know, an attitude cannot be observed in the same way we for instance observe individuals’ income level. However, suppose you have access to the responses to the following questions: o “Having a child will limit my employment opportunities” o “A child will bring joy and satisfaction to my life” o “Without a child, there will be no-one to care for me in old age” Further assume that the answers to these questions range from 1: Strongly disagree to 5: Strongly agree. A composite scale could be constructed from taking the mean of the three questions for each individual.
  • Anchored scales à scales in which selected values are named or “anchored” as a guide to the respondent. A fully anchored scale that ranges from strongly disagree to strongly agree is known as a “Likert scale”.

RESEARCH PROCESS

1. Problem definition a. Selection of a theory or other basis for definition of the specific study à A in-depth literature search has to be run on recognized sources b. Identification of the unit of analysis à Individuals, couples, teams, firms… c. Identification of the fundamental concepts to be studied d. Expected of proposed relationship between concepts 2. Prepare the design of your study: How do you collect and analyze your data? a. Omitted variable bias, reverse causality, simultaneity b. Selection of the statistical technique c. Definition of the population of interest d. Measurement of the population (sampling) 3. Identify data sources and collect data Census à Data are collected from every member of a population Sample à the group analyzed, drawn from the population - Probability sample à random selection so each unit has an equal chance of being selected - Convenience sample à the units that are selected for inclusion in the sample are the easiest to access; we cannot be sure that it will be a representative sample - Stratified sample à to cover all parts of the population. For instance, if we make a sample of individuals of a country, then we might be interested in well covering all regions in this country Population à the group of people, items or units under investigation

Primary data They are data gathered specifically for the current study, e.g., a survey; observation of web users; an experiment o Observation à data collected by observing people, events, or objects § Cross-sectional data à collected from a cross-section of the population § Longitudinal data à collected at successive periods of time using the same population o Surveys à most used in social science, as quantitative method for data collection, questions are used as measurement tool o Experiments à data collected before and after an intervention of the researcher The intervention is the independent variable (X, e.g. training program) and the outcome to be changed is the dependent variable (Y, e.g. skills, knowledge). We compare outcomes for individuals who have participated to the intervention with outcomes for individuals who have not participated. We want the two groups to be as close as possible to being the same group! Ideally, we can achieve this through randomization. Issues with data collection o Interviewer effects à The nature of the contact can influence responses so that observed data are not a truthful representation of reality (data suffers from social desirability bias) o Non-response bias § Non-response through refusal à If there are grounds to believe that those who refuse to co-operate are consistently different type from those who tend to provide responses and if this difference is relevant for your research, then your findings may be biased. § Non-response through no contact à If the mode of the survey systematically favors the inclusion of some groups and not others, a bias will result. What leads to non-response? The characteristics of respondents. (e.g. age, sex, literacy, employment status, etc), the nature of contact (the way in which people are approached influences response rate), the subject of research (sex, race, religion, politics, income)… Secondary data They are data already gathered by another person or organization, e.g., national statistics, marketing firm data, social media sensing from a third-party company, etc. o Advantages à Inexpensive, can be obtained quickly, can help frame a research project and define the population, higher data quality (national and other professional research organizations are often able to invest more to obtain high data quality than is possible in one-off studies, e.g. they can take larger samples) o Disadvantages à Difficult or unfamiliar formats that are difficult, data definitions may include or exclude elements that are important to your research, uncertainties about data quality (validity, reliability, accuracy, precision) Aids to understanding the quality of secondary data à Purpose of study in which data were collected, scope statements for data (e.g., “at July 2005”..) and definitions provided with the data file (e.g., “youth = males and females under 18 years”). Data quality o Validity à truth in measurement, focused on the target o Reliability à consistency of measurement o Accuracy à measurement is correct (no errors in data entry) o Precision à the level of detail of measurement (e.g. how many decimal points)

**4. Process and analyze the data

  1. Interpret the results and formulate conclusions**

Not only the average level of the outcome is important to find significant differences among groups but also the variation within groups. With ANOVA, we test for differences driven by one factor only, but many other factors can potentially drive the observed variability! For example, variability on sales might be driven by the type of store, the location of the store, the location of the product, the music that is played in the store, and also packaging. BUT we are interested only in the last source of variance and, therefore, we might think at splitting it into two parts, one depending on the factor been considered and one due to all other factors. Comparing the variation due to the factor of interest and the variation due to all the other factors is the intuition behind ANOVA! Definition of variance Since ANOVA is the “analysis of variance”, let’s revisit the concept of sample variance. Variation is the “average squared deviation (or difference) of data points from the mean”

  • Compute the mean
  • Take the distance of each data point from the mean
  • Square each distance (squared differences)
  • Add these squares together (total sum of squares)
  • Find the average squared distance (divide by degrees of freedom N-1 for sample or N for population) Formulas Population i Observations j 1 2 … K 1 x11 x21 … xK 2 x12 x22 … xK … … … … … n x1n x2n … xKn Sample means In the example: Total number of observations In the example: n = 20 Overall sample mean In the example: EXAMPLE Population i Observations j 22.2 24.6 22. 19.9 23.1 21. 20.3 22.0 23. 21.4 23.5 24. 21.2 23.6 22. 21.0 22.1 23. 20.3 23.5 -

SSW: Variability within groups SSW (Sum of squares within groups): Dispersion of the observations from the group-specific mean. In the example: SSG: Variability between groups SSG (Sum of squares between groups): Dispersion between the group sample means. It is based on the discrepancies between the individual group means and the overall mean. In the example: SST: Total sum of squares SST (Total sum of squares): dispersion of the observations with respect to the overall mean. which is equal to… In the example: MSW: Mean square within groups MSW is the unbiased estimator of population variance. In the example: MSG: Mean square between groups MSG is the unbiased estimator of population variance if the population means are equal, that is if H0 is true (otherwise it would not be unbiased). In the example:

LINEAR REGRESSION

Correlation vs regression Correlation

  • Measures degree to which two variables are related
  • Same correlation coefficient if you swap x with y
  • Does not capture cause and effect
  • Does not fit a line
  • Does not quantify the change in one variable associated with the change in the other Regression - Relationship is evaluated through a dependency model (does capture cause-effect) - The regression of y on x is not the same as that of x on y - Fits a line through the data - The impact of one variable on the other is quantified How good is the prediction without linear regression? We build a statistical model that explains and predicts wage as a function of how many years people study. With only one variable (wage) and no other information, the best prediction for people’s wage is the mean wage in the sample (in this case is ~ 6). We need to know how “good” this line fits these observed data points. One way to evaluate the “goodness of fit” of the line would be to measure the distance that the points are from the mean line by squaring the residuals and sum them up. This makes the residuals positive and emphasizes large deviations.

Simple Linear Regression

  • Now let’s see how the impact of the single independent variable (years of education) on wage can be evaluated using a simple linear regression.
  • Considering the number of years of schooling in our prediction of wage, will give a NEW “best fit” line
  • It should “remove” some residuals by explaining the variability of the wage among people by means of the different number of years of education The equation and graph Any variation that is not explained by X 1 is captured in ε. We tend to call this the error term or disturbance term, and it needs to be in our equation, because any left over variation (after having used X 1 to explain Y), needs to be mopped up somewhere. Thanks to linear regression we go from the graph on the left to the graph on the right, minimizing the residuals.

Assumptions of the simple linear regression model

  1. Linearity à between Y and X
  2. Independence à error terms are independent and identically distributed Cov(ɛi, ɛj) = 0
  3. Normality à ɛi is normally distributed ɛ ~ N(0,1)
  4. Homoscedasticity à ɛi have equal variance Var(ɛi) = σ^2 How do we find the best possible line? We find the best regression line is using the least squares method.
  • Many lines can be traced through the points representing the data, but we use the ones closest to the data.
  • b0 and b1 are obtained by finding the values of b0 and b1 that minimize the sum of the squared differences between y and ŷ HOW “GOOD” THE REGRESSION MODEL IS? How good is the regression model in fitting the data, explaining and predicting the response? How well does the least squares line explain variation in Y? SST àMeasures the variation of the yi values around their mean SSR à Explained variation attributable to the linear relationship between x and y SSE à Variation attributable to factors other than the linear relationship between x and y Coefficient of Determination R^2
  • The coefficient of determination is the portion of the total variation in the dependent variable that is explained by variation in the independent variable.
  • In the case of one single covariate the R^2 = r^2 à it is the square of the correlation coefficient between the response and covariate. P-value P-value is the probability of observe more extreme values than the ones observed, assuming the null hypothesis is true. P-value is the minimal probability of rejecting the null hypothesis, when the null hypothesis is true.
  • When p-value is small (smaller than α), we reject the null hypothesis in favor of the alternative.
  • When p-value is big (bigger than α), we do not reject the null hypothesis Confidence Interval
  • A confidence interval is the percentage of times that the confidence interval actually contains the population parameter assuming the process is repeated a large number of times
  • It is NOT where 95% of the observations in a sample will fall CASE t-score H1 CRITICAL REGION P-VALUE < α METHOD β1 ≠ β1 > β1 < REJECT THE H0 IF… β1 Test 𝑡 < −𝑡$%&,( & and 𝑡 > 𝑡$%&,( & 𝑡 < −𝑡$%&,( 𝑡 > 𝑡$%&,( 𝑝𝑣𝑎𝑙𝑢𝑒 = 2𝑃 𝑇 > 𝑡𝑠𝑐𝑜𝑟𝑒 𝑝𝑣𝑎𝑙𝑢𝑒 = 𝑃 𝑇 > 𝑡𝑠𝑐𝑜𝑟𝑒

Estimation of the model error variance The unbiased estimate of the variance of the errors (under the standard assumptions) is:

  • The square root of the sample variance (se) is called the standard error of the estimate and it can be seen as an overall measure of error, made in the prediction of the response by means of the regression model.
  • It’s an extremely important value because the standard error of intercept and slopes depend on it. If its value is higher, then also standard error of coefficient are higher and, ceteris paribus, will be more likely not to find significant results.
  • The model with lower se fits the data better à if se is low also the adjusted- R^2 will be high F-Test for Overall Significance of the Model It shows if there is a linear relationship between all the X variables considered together and Y
  • General rule of thumb is that if F>4 we reject the null hypothesis
  • The closer F is to 1, the worse is the model
  • If we don’t reject the null hypothesis the model is invalid and the “variability” of the estimated model is purely random, not in any way different from the “variability” of the residuals. Example: the p-value is smaller than 0.5 so we reject the null hypothesis Relationship between the F-test and the t-test Note that there is a close relationship between the F-test and the t-test: à o The p-value of the F-test and t-test are equal! o If at least one t-test is significant, the F-test is significant. o It could be the case that all t-test are not significant and F-test it is significant (sign of multicollinearity!)

ASSUMPTIONS OF THE MULTIPLE LINEAR REGRESSION MODEL

  1. Linearity à between Y and X1, X2…
  2. Independence à error terms are independent and identically distributed Cov(ɛi, ɛj) = 0 With positive serial correlation (the most common form of serial correlation), the variance of the errors will be lower, and standard errors will be biased downward, making the model look better than it really is.
  3. Normality à ɛi is normally distributed ɛ ~ N(0,1)
  4. Homoscedasticity à ɛi have equal variance Var(ɛi) = σ^2
  5. No perfect multicollinearity à no covariates (Xi) is a linear combination of the others Otherwise we would have redundant information, unstable coefficients, and coefficient signs may not match prior expectations.
  6. No endogeneity à The values Xi and ɛi are not correlated Cov(ɛi, Xi) = 0 The ‘no endogeneity’ bias is often referred to as omitted variable bias. Omitted Variable Bias (OVB) is the bias of the estimators of regression coefficients caused by omitting relevant variables. OVB are variables correlated both with the dependent variable and with the independent variables included in the regression. Endogeneity vs multicollinearity Leaving out correlated variables forces the variables that are present to carry the weight of both direct and indirect effects, while including all variables isolates their effect so coefficients only measure their direct effect. If you include everything there is no OVB, but at the same time you create other problems like multicollinearity. However, while incorrect omission of variables leads to biased estimates of the parameters that are included, wrong inclusion of irrelevant variables (such multicollinear variables) only produces inefficient estimates, so OLS don’t have minimum variance. So, it’s better to include wrong variables rather than exclude right ones. Properties of ordinary least squares Gauss-Markov theorem: The ordinary least squares estimators bj are best linear unbiased estimators for βj
  • Best : smallest variance (in the class of linear unbiased estimators) à Efficiency
  • Linear : they are a linear function of Yi à Linearity
  • Unbiased : E(bj) = βj (if, on average, it hits the true parameter value) à Unbiasedness For Linearity and Unbiasedness, we only need:
  • Assumptions 1
  • Assumption 2
  • Assumption 6 For Efficiency we also need:
  • Assumption 4
  • Part of assumption 3 à the error terms are random variables with means 0 o If the error term has not only mean 0, but it is also distributed normally (Assumption 3) then ordinary least squares estimators are normally distributed. o For the central limit theorem, even if errors are not perfectly normal but the sample size is high, the ordinary least squares estimator are approximately normal. o If errors are not normal and sample size is small, the ordinary least squares estimators are not normal and standard error can be biased. Inference in this case may be invalid (usually, standard errors are biased downward, and significance levels are higher than the correct ones).
  1. Normality à ɛi is normally distributed ɛ ~ N(0,1) Detection We can check the normality of residuals through:
    • Histograms and density plots
    • QQ and Normal probability plots (PP) o They compare the observed distribution, in terms of quantiles or observed frequencies, to a theoretical one. o QQ Plots is a scatter plot of the observed quantiles against the theoretical quantiles. o PP Plots is a scatter plot of the observed frequencies against the theoretical probabilities. o If the points lie on the straight line we conclude that the sample is drawn from the theoretical distribution. Remedies
    • If errors are non-normal but their mean is equal to zero, ordinary least squares are still efficient estimator
    • If sample size is large and/or deviations from normality are small, don’t worry much...
    • Try some transformation of the response, such as the logarithmic transformation
  2. Homoscedasticity à ɛi have equal variance Var(ɛi) = σ^2 Detection
    • Scatter plot of estimated (standardized) residuals versus predicted (standardized) values
    • Scatter plot of estimated (standardized) residuals versus one of the regressor (suspected to cause heteroskedasticity) Remedies
    • Take the log transformation of the dependent variable
    • Change the estimation method (e.g., Weighted Least Square)
    • Apply formulas to get correct standard error (White heteroskedasticity-consistent standard errors)
    • Solve the cause of heteroskedasticity (non-linearity, omitted variable…)
  1. No perfect multicollinearity à no covariates (Xi) is a linear combination of the others Detection
    • Regression coefficients differ considerably from values indicated by theory or experience including having incorrect signs.
    • Coefficients of variables believed to be a strong influence have small Student’s t statistics indicating that their values do not differ from 0.
    • All the coefficient student t statistics are small, indicating no individual effect, and yet the overall F statistic indicates a strong effect for the total regression model.
    • High correlations between individual independent variables or one or more of the independent variables have a strong linear regression relationship to the other independent variables or a combination of both.
    • Variance Inflation Factor (VIF) The Variance Inflation Factor (VIF) tells us whether we are having a multicollinearity problem. o VIF measures how much the standard errors of our estimated regression coefficients increase compared to the case in which our X had no relation with the other variables o We could see it as an indication of how much ‘precision’ we lose in our estimates. o The higher is the linear relationship Xj and the other covariates, the higher is the VIF and more serious is multicollinearity o Rule of thumb: if VIF > 5 we have multicollinearity; if VIF > 10 we have serious multicollinearity
    • Correlation matrix
    • Tests on a subset of coefficients à Partial F-test (Chow test) Consider a multiple regression model involving variables xj and zj, and the null hypothesis that the z variable coefficients are all zero: In other words, we compare two models: Specifically, we compare the explained (SSR) variability in the two models. o If the SSR of the complete model is significantly higher than the SSR in the restricted, we will reject the null hypothesis (the complete model is “better”: at least one of the variables excluded in the restricted model is relevant). o We can think to the comparison between the two models also as a comparison in the R^2 or reduction of SSE (If the increase in the R^2 is significant, then we reject H0). Remedies
    • Eliminate one (or more) collinear variables
    • Transform the collinear variables in a single new indicator (e.g., take the mean of collinear variables)
    • Retain the collinear variable but interpret the p-values with care

Exponential Model Transformations Logarithmic transformation and interpretation When the response variable in multiple linear regression model is a logarithm of variable (as ln_wage), each covariate coefficient estimate is the average change in the logarithm of the response variable associated with a unit change in the covariate, controlling for all other covariates. Therefore, it quantifies the average % change in the original response variable associated with a unit increase in the covariate when all other covariates are kept constant. With numerical variables: With dummy variables: DUMMY VARIABLES

  • We could also use an independent variable that took on only two values: x = 0 and x = 1. This structure is commonly defined as a dummy variable (or indicator variable), and it provides a valuable tool for applying multiple regression to situations involving categorical variables.
  • When X 2 = 0 in this equation, the constant is b 0 , but when X 2 = 1, the constant is b 0 + b 2. Thus, the dummy variable shifts the linear relationship between Y and X 1 by the value of the coefficient b 2.
  • A dummy coefficient estimate is then the difference between the mean values of the response in the two groups when all other covariates are kept constant and fixed. In this case, the average difference between the hourly pay of women and men is - 3.073. Let’s consider gender in the relationship between experience (x) and income (y). We add Gender as an additional explanatory variable, by means of a dummy variable: Female = 1, Male = 0 Simpson’s Paradox It’s a trend that appears in different groups of data disappears when these groups are combined (the reverse trend appears for the aggregate data).

Interaction effects: Dummy Variable Regression for Differences in Slope Up to now we have assumed that the impact of a covariate on the response is the same regardless of the values taken by the other covariates. In reality, two covariates may interact. E.g. does experience play the same role for males and for females? A slope dummy variable is given by the interaction between a dummy and a numeric variable.

  • It takes the value 0 when the dummy=
  • It takes the value of a real independent variable when the dummy= Slope dummies are used when the data is not well modeled by two equally sloped lines line but fit two lines with different slopes (one per dummy category). To determine if there are significant differences in slopes between two discrete conditions, we need to expand our regression model to a more complex form: y = b 0 + b 2 x 2 + b 1 x 1 + b 3 x 2 x 1 The resulting regression model is now linear with three variables. The new variable, x 2 x 1 , is often called an interaction variable. Note that when the dummy variable x 2 = 0, this variable has a value of 0, but when x 2 = 1, this variable has the value of x 1.
  • TenureXFemale = 0 if at least Tenure = 0 or Female = 0
  • TenureXFemale > 0 if both Tenure > 0 or Female = 1 The interaction term is significant: an additional year of working experience with the current employer has a different impact for males and females. It increases the males wage by 0.2019$/h (Female = 0 = Male is the baseline!!) and increases the females’ wage by 0.0656$/h (=0.2019-0.1363), controlling for other covariates. The dummy variable trap Multicollinearity frequently arises with regards to “dummy variables” To avoid it, omit one category when including dummy variables (we do not include the dummies “Male” and “Female” contemporarily)