Maximum likelihood estimation assignment

* Review

Linear Regression is a linear model to demostrate the relationship between a dependent variable, y and independent variable(s), x. This protrays a simple linear regression. Reading over this week’s slides and the 3 articles, we study MLE and the linear relationship between income and education using the “turnout”" data through two different ways. MLE gives a estimate of the paramenters (example: mean &/or standard deviation) of a statistical model, while using given observations. The parameter values maximize the likelihood function with the data used. In simplier words, MLE is a way that helps find the values of mu and sigma which helps result the line/curve that best fits the data. The best fit line is usually used through a OLS method. OLS, also known as Ordinary Least Squares, is a linear least squared method used to estimate the least squared distance between actual plotted y values from the data and unknown parameters. In other words,OLS chooses parameters of linear best fit line for a data set by minimizing the sum of squares of the difference between the observed actual dependent values; so the actual point is called Residual(R) - Standard Error.

* Comparision between Slide 4.14 & 4.18 Outputs

The results show the log-likelihood function protraying the effect of education on voters income from the “turnout” data. Education is used as a independent variable and income is the dependent variable. The three parameters in the results in slide 4.14 are sigma, beta1 and beta2.

Sigma is the Residual Standard Error, which means the average of differences between predicted y values and actual y data values as mentioned before. Beta1 is the y-intercept which is where the line starts and Beta2 is the slop of the line. Additionally the Pr(>t) value determines whether or not the results are significant.

Slide 4.14 tells us that in this model, the average distance between the data point and best fit line is 2.526. The y-intercept is -0.65, meaning those who have no education have a income of -0.65. The slope is .376 which in simple words means for every 1 unit increase in education, a person’s income increases by .376 units in this dataset. The results illustrate a postive relationship between education and income in this dataset. Votes who tend to have higher level of education will have higher level of income. This makes logical sense as education is a positive impact on income worldwide. The results are statisticially significant for beta1 and beta2 as p<.05.

On the other hand, the results on slide 4.18 show the effect education has on the standard deviation of income. The three parameters used in this model are mu, theta1 and theta2. Theta1 is the y-intercept and theta2 is the slope which represents the effect education has on the standard deviation on income. The y-intercept is 1.461 which means this is where the regression line starts and voters who have no education, have a 1.46 VARIABLITIY on income. I use the word variablity as, while using this model, it that shows the effect education has on the variablitiy of income. The slope is 0.109, representing for every 1 unit increase in a voters eduation, there is an increase in income by 0.109 in standard deviation. The increase in standard deviation means that as education increase the distance between the lowest and highest point of income for each education year is the highest level of education there is a high level of variability and for the lowest level of education there is a low level of variability. Mu is 3.52, which means the average income is 3.52 for voters in the dataset. The results are statistically significant as p<0.05.

Both Models give us the effect of education on income for Voters with a slight difference being that Slide 4.14 is the effecot of education on income and slide 4.18 is the effect of education on the Standard Deviation of income.

* Adding a second independent variable, Age

For both models, if we introduce a second independent variable being age, the results would change for both sigma as well as mu. Even though age is related to education as well as income increasing during time; there is a decline for those with fixed income earnings. The relationship between age and income would probably be negative as once people get older they reach a maximum amount of money as well as when they start there is a decline in income. The relationship would be best studied in the mid age groups. Education was used in our original model as a predictor for income but what we dont know is that age may have been included (Not Offically). In other words, education could be a proxy which includes age and various other parameters for the result in increasing or decreasing of income. Likewise, if we use age and run a simple linear regression between age and income, the standard error would be higher and the stastistically significance maybe not significant enough because a better regression would require more parameters to be incuded.

In conclusion, age will effect the relationship between income and education drastically in a negative significance as now the model will be of examining the result of 3 variables. Though for some regressions, it is better to have more predicting variables to include for a better result.

LS0tCnRpdGxlOiAiSG9tZXdvcmsgMyIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQojI01heGltdW0gbGlrZWxpaG9vZCBlc3RpbWF0aW9uIGFzc2lnbm1lbnQKCiMjIyogUmV2aWV3CgpMaW5lYXIgUmVncmVzc2lvbiBpcyBhIGxpbmVhciBtb2RlbCB0byBkZW1vc3RyYXRlIHRoZSByZWxhdGlvbnNoaXAgYmV0d2VlbiBhIGRlcGVuZGVudCB2YXJpYWJsZSwgeSBhbmQgaW5kZXBlbmRlbnQgdmFyaWFibGUocyksIHguIFRoaXMgcHJvdHJheXMgYSBzaW1wbGUgbGluZWFyIHJlZ3Jlc3Npb24uIFJlYWRpbmcgb3ZlciB0aGlzIHdlZWsncyBzbGlkZXMgYW5kIHRoZSAzIGFydGljbGVzLCB3ZSBzdHVkeSBNTEUgYW5kIHRoZSBsaW5lYXIgcmVsYXRpb25zaGlwIGJldHdlZW4gaW5jb21lIGFuZCBlZHVjYXRpb24gdXNpbmcgdGhlICJ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