Wednesday, January 26, 2011

Excel



Introduction


Microsoft Excel is a commercial spreadsheet application written and distributed by Microsoft for Microsoft Windows and Mac OS X. It features calculation, graphing tools, pivot tables and a macro programming language called Visual Basic for Applications. It has been a very widely applied spreadsheet for these platforms, especially since version 5 in 1993. Excel forms part of Microsoft Office. The current versions are 2010 for Windows and 2011 for Mac.



Regression





Definition
A statistical measure that attempts to determine the strength of the relationship between one dependent variable (usually denoted by Y) and a series of other changing variables (known as independent variables). 
Regression involves taking the position of a child in some problematic situation, rather than acting in a more adult way. This is usually in response to stressful situations, with greater levels of stress potentially leading to more overt regressive acts. 
Regressive behavior can be simple and harmless, such as a person who is sucking a pen (as a Freudian regression to oral fixation), or may be more dysfunctional, such as crying or using petulant arguments..

Linear Regression: Y = a + bX + u 
Multiple Regression: Y = a + b1X+  b2X2 + B3X3 + ... + BtXt + u

Where:
Y= the variable that we are trying to predict
X= the variable that we are using to predict Y 
a= the intercept 
b= the slope 
u= the regression residual. 

In multiple regression the separate variables are differentiated by using subscripted numbers. 

Regression takes a group of random variables, thought to be predicting Y, and tries to find a mathematical relationship between them. This relationship is typically in the form of a straight line (linear regression) that best approximates all the individual data points. Regression is often used to determine how much specific factors such as the price of a commodity, interest rates, particular industries or sectors influence the price movement of an asset.



Investopedia explains Regression

The two basic types of regression:

1. Linear Regression

Linear regression analyzes the relationship between two variables, X and Y. For each subject (or experimental unit), you know both X and Y and you want to find the best straight line through the data. In some situations, the slope and/or intercept have a scientific meaning. In other cases, you use the linear regression line as a standard curve to find new values of X from Y, or Y from X.  In linear regression, models of the unknown parameters are estimated from the data using linear functions. Such models are called linear models. Most commonly, linear regression refers to a model in which the conditional mean of y given the value of X is an affine function of X. Less commonly, linear regression could refer to a model in which the median, or some other quantile of the conditional distribution of y given X is expressed as a linear function of X. Like all forms of regression analysis, linear regression focuses on the conditional probability distribution of given X, rather than on the joint probability distribution of y and X, which is the domain of multivariate analysis. Linear regression was the first type of regression analysis to be studied rigorously, and to be used extensively in practical applications. This is because models which depend linearly on their unknown parameters are easier to fit than models which are non-linearly related to their parameters and because the statistical properties of the resulting estimators are easier to determine.
Linear regression has many practical uses. Most applications of linear regression fall into one of the following two broad categories:

  • If the goal is prediction, or forecasting, linear regression can be used to fit a predictive model to an observed data set of y and X values. After developing such a model, if an additional value of X is then given without its accompanying value of y, the fitted model can be used to make a prediction of the value of y.
  • Given a variable y and a number of variables X1, ..., Xp that may be related to y, then linear regression analysis can be applied to quantify the strength of the relationship between y and the Xj, to assess which Xj may have no relationship with y at all, and to identify which subsets of the Xj contain redundant information about y, thus once one of them is known, the others are no longer informative.
Linear regression models are often fitted using the least squares approach, but they may also be fitted in other ways, such as by minimizing the “lack of fit” in some other norm, or by minimizing a penalized version of the least squares loss function as in ridge regression. Conversely, the least squares approach can be used to fit models that are not linear models. Thus, while the terms “least squares” and linear model are closely linked, they are not synonymous.


2. Quadratic Regression


A process by which the equation of a parabola of "best fit" is found for a set of data.Before performing the quadratic regression, first set an appropriate viewing rectangle.To calculate the Quadratic Regression, press STATthen RIGHT ARROW to CALC.  Now select 5:QuadReg.After QuadReg appears alone on the screen, press ENTER.Then the quadratic regression will appear on the screen.Y= while leaving PLOT1 on for the data values.Then press GRAPH to see how well the curve fits the data points. NOTE: The regression results may be copied directly into  for graphing purposes by using the following procedure: After the data values have been entered, press STAT, then RIGHT ARROW to CALC. 


Now select 5:QuadReg.  
After QuadReg appears alone on the screen, press VARS, then ARROW RIGHT to Y-VARS, noting 1:Function is selected.  Press ENTER to accept and note that 1: is already selected.  Press ENTER to accept, then  pressENTER to calculate.   The result appears on the screen to several decimal places. 
Now press  to see that the equation has already been entered for  and is ready to graph.


This is the preferred method for entering the regression equation into  , since rounding the values can introduce significant rounding errors.


Here are the example of the regression:



Beer's Law states that there is a linear relationship between concentration of a colored compound in solution and the light absorption of the solution. This fact can be used to calculate the concentration of unknown solutions, given their absorption readings. First, a series of solutions of known concentration are tested for their absorption level. Next, a scatter plot is made of this empirical data and a linear regression line is fitted to the data. This regression line can be expressed as a formula and used to calculate the concentration of unknown solutions.




Strong acid-strong base titration, a strong base (NaOH) of known concentration is added to a strong acid (also of known concentration, in this case). As the strong base is added to solution, its OH- ions bind with the free H+ions of the acid. An equivalence point is reached when there are no free OH- nor H+ ions in the solution. This equivalence point can be found with a color indicator in the solution or through a pH titration curve.



Linear Regression

Quadratic regression

For more information:
Regression





1 comment: