In Excel for the web, you can view the results of a regression analysis (in statistics, a way to predict and forecast trends), but you can’t create one because the Regression tool isn’t available.
You also won’t be able to use a statistical worksheet function such as LINEST to do a meaningful analysis because it requires you enter it as an array formula, which isn’t supported in Excel for the web.
If you have the Excel desktop application, you can use the Open in Excel button to open your workbook and use either the Analysis ToolPak’s Regression tool or statistical functions to perform a regression analysis there.
Click Open in Excel and perform a regression analysis.
For news about the latest Excel for the web updates, visit the Microsoft Excel blog.
For the full suite of Office applications and services, try or buy it at Office.com.
Need more help?
Regression is done to define relationships between two or more variables in a data set. In statistics, regression is done by some complex formulas. But, Excel has provided us with tools for regression analysis. So, in the Excel Analysis ToolPak, click “Data Analysis” and “Regression” to conduct regression analysis in Excel.
Table of contents
- What is Regression Analysis in Excel?
- Explained
- Examples
- How to Run Regression Analysis Tool in Excel?
- How to Use Regression Analysis Tool in Excel?
- Steps to Create Regression Chart in Excel
- Things to Remember
- Recommended Articles
Explained
The Regression analysis tool performs linear regression in excelLinear Regression is a statistical excel tool that is used as a predictive analysis model to examine the relationship between two sets of data. Using this analysis, we can estimate the relationship between dependent and independent variables.read more examination using the “minimum squares” technique to fit a line through many observations. You can examine how an individual dependent variable is influenced by the estimations of at least one independent variable. For instance, you can investigate how such factors influence a sportsman’s performance as age, height, and weight. You can distribute shares in the execution measure to every one of these three components, given a lot of execution information, and then utilize the outcomes to foresee the execution of another person.
The Excel regression analysis tool helps you see how the dependent variable changes when one of the independent variables fluctuates and permits you to numerically figure out which of those variables truly has an effect.
You are free to use this image on your website, templates, etc, Please provide us with an attribution linkArticle Link to be Hyperlinked
For eg:
Source: Regression Analysis in Excel (wallstreetmojo.com)
Examples
- Sales of shampoo are dependent upon the advertisement. If $1 million increases advertising expenditure, sales will be expected to increase by $23 million. If there were no advertising, we would expect sales without any increment.
- House sales (selling price, number of bedrooms, location, size, design) predict the selling price of future sales in the same area.
- Soft drink sales massively increase in summer when the weather is too hot. People purchase more and more soft drinks to keep them cool. The higher the temperature, the higher the sales and vice versa.
- In March, exam season started, and sales increased due to students purchasing exam pads. Exam pads sale depends upon the examination season.
How to Run Regression Analysis Tool in Excel?
- We must enable the Analysis ToolPak Add-in.
- In Excel, click on the “File” on the extreme left-hand side, go and click on the “Options” at the end.
- On clicking on “Options,” select “Add-ins” on the left side. Excel Add-ins are chosen in the “View and manage Microsoft Add-ins” and “Manage” boxes. Then, click “Go.”
- In the Add-in dialog box, click on Analysis Toolpak, and click OK:
It will add the “Data Analysis” tools on the right-hand side to the Excel ribbon’s “Data” tab.
How to Use Regression Analysis Tool in Excel?
We must use the data for regression analysis in Excel.
You can download this Regression Excel Template here – Regression Excel Template
Once Analysis ToolpakExcel’s data analysis toolpak can be used by users to perform data analysis and other important calculations. It can be manually enabled from the addins section of the files tab by clicking on manage addins, and then checking analysis toolpak.read more is added and enabled in the Excel workbook, follow the steps mentioned below to practice the analysis of regression in Excel:
- Step 1: On the Data tab in the Excel ribbonThe ribbon is an element of the UI (User Interface) which is seen as a strip that consists of buttons or tabs; it is available at the top of the excel sheet. This option was first introduced in the Microsoft Excel 2007.read more, click the Data Analysis
- Step 2: Click on the “Regression” and click “OK” to enable the function.
- Step 3: On clicking the “Regression“ dialog box, we must arrange the accompanying settings:
- For the dependent variable, select the “Input Y Range,” which denotes the dependent data. Here, in the below-given screenshot, we have selected the range from $D$2:$D$13.
- Select the “Input X Range,” which denotes the independent data for the independent variable. Here, in the below-given screenshot, we have selected the range from $C$2:$C$13.
- Step 4: Click “OK” and analyze the data accordingly.
When you run the regression analysis in Excel, the following output will come:
You can also make a scatter plot in excelScatter plot in excel is a two dimensional type of chart to represent data, it has various names such XY chart or Scatter diagram in excel, in this chart we have two sets of data on X and Y axis who are co-related to each other, this chart is mostly used in co-relation studies and regression studies of data.read more of these residuals.
Steps to Create Regression Chart in Excel
- Step 1: Select the data as given in the below screenshot.
- Step 2: Tap on the “Inset” tab. In the “Charts” gathering, tap the “Scatter” diagram or some other as a required symbol. Select the chart which suits the information.
- Step 3: We can modify the chart when required and fill in the hues and lines of your decision. For instance, we can pick alternate shading and utilize a strong line of a dashed line. We can customize the graph as we want to customize it.
Things to Remember
- We must always check the dependent and independent values. Otherwise, the analysis will be wrong.
- If you test a huge number of data and thoroughly rank them based on their validation period statisticsStatistics is the science behind identifying, collecting, organizing and summarizing, analyzing, interpreting, and finally, presenting such data, either qualitative or quantitative, which helps make better and effective decisions with relevance.read more.
- Choose the data carefully to avoid any kind of error in excel analysis.
- We can optionally check any of the boxes at the bottom of the screen, although none of these is necessary to obtain the line best-fit formula.
- Start practicing with small data to understand the better analysis and run the regression analysis tool in Excel easily.
Recommended Articles
This article is a step-by-step guide to Regression Analysis in Excel. Here we discuss how to run regression in Excel, its interpretation, and use this tool along with Excel examples and downloadable Excel templates. You may also look at these useful functions in Excel: –
- Examples of Normal Distribution Graph in Excel
- Regression vs. ANOVABoth the Regression and ANOVA are the statistical models which are used in order to predict the continuous outcome but in case of the regression, continuous outcome is predicted on basis of the one or more than one continuous predictor variables whereas in case of ANOVA continuous outcome is predicted on basis of the one or more than one categorical predictor variables.read more
- Excel Exponential Smoothing
- Exponential Function ExcelExponential Excel function(EXP) is an inbuilt function in excel used to calculate the exponent raised to the power of any number you provide. In this function the exponent is constant and is also known as the base of the natural algorithm.read more
Reader Interactions
Содержание
- Подключение пакета анализа
- Виды регрессионного анализа
- Линейная регрессия в программе Excel
- Разбор результатов анализа
- Вопросы и ответы
Регрессионный анализ является одним из самых востребованных методов статистического исследования. С его помощью можно установить степень влияния независимых величин на зависимую переменную. В функционале Microsoft Excel имеются инструменты, предназначенные для проведения подобного вида анализа. Давайте разберем, что они собой представляют и как ими пользоваться.
Подключение пакета анализа
Но, для того, чтобы использовать функцию, позволяющую провести регрессионный анализ, прежде всего, нужно активировать Пакет анализа. Только тогда необходимые для этой процедуры инструменты появятся на ленте Эксель.
- Перемещаемся во вкладку «Файл».
- Переходим в раздел «Параметры».
- Открывается окно параметров Excel. Переходим в подраздел «Надстройки».
- В самой нижней части открывшегося окна переставляем переключатель в блоке «Управление» в позицию «Надстройки Excel», если он находится в другом положении. Жмем на кнопку «Перейти».
- Открывается окно доступных надстроек Эксель. Ставим галочку около пункта «Пакет анализа». Жмем на кнопку «OK».
Теперь, когда мы перейдем во вкладку «Данные», на ленте в блоке инструментов «Анализ» мы увидим новую кнопку – «Анализ данных».
Виды регрессионного анализа
Существует несколько видов регрессий:
- параболическая;
- степенная;
- логарифмическая;
- экспоненциальная;
- показательная;
- гиперболическая;
- линейная регрессия.
О выполнении последнего вида регрессионного анализа в Экселе мы подробнее поговорим далее.
Внизу, в качестве примера, представлена таблица, в которой указана среднесуточная температура воздуха на улице, и количество покупателей магазина за соответствующий рабочий день. Давайте выясним при помощи регрессионного анализа, как именно погодные условия в виде температуры воздуха могут повлиять на посещаемость торгового заведения.
Общее уравнение регрессии линейного вида выглядит следующим образом: У = а0 + а1х1 +…+акхк
. В этой формуле Y означает переменную, влияние факторов на которую мы пытаемся изучить. В нашем случае, это количество покупателей. Значение x – это различные факторы, влияющие на переменную. Параметры a являются коэффициентами регрессии. То есть, именно они определяют значимость того или иного фактора. Индекс k обозначает общее количество этих самых факторов.
- Кликаем по кнопке «Анализ данных». Она размещена во вкладке «Главная» в блоке инструментов «Анализ».
- Открывается небольшое окошко. В нём выбираем пункт «Регрессия». Жмем на кнопку «OK».
- Открывается окно настроек регрессии. В нём обязательными для заполнения полями являются «Входной интервал Y» и «Входной интервал X». Все остальные настройки можно оставить по умолчанию.
В поле «Входной интервал Y» указываем адрес диапазона ячеек, где расположены переменные данные, влияние факторов на которые мы пытаемся установить. В нашем случае это будут ячейки столбца «Количество покупателей». Адрес можно вписать вручную с клавиатуры, а можно, просто выделить требуемый столбец. Последний вариант намного проще и удобнее.
В поле «Входной интервал X» вводим адрес диапазона ячеек, где находятся данные того фактора, влияние которого на переменную мы хотим установить. Как говорилось выше, нам нужно установить влияние температуры на количество покупателей магазина, а поэтому вводим адрес ячеек в столбце «Температура». Это можно сделать теми же способами, что и в поле «Количество покупателей».
С помощью других настроек можно установить метки, уровень надёжности, константу-ноль, отобразить график нормальной вероятности, и выполнить другие действия. Но, в большинстве случаев, эти настройки изменять не нужно. Единственное на что следует обратить внимание, так это на параметры вывода. По умолчанию вывод результатов анализа осуществляется на другом листе, но переставив переключатель, вы можете установить вывод в указанном диапазоне на том же листе, где расположена таблица с исходными данными, или в отдельной книге, то есть в новом файле.
После того, как все настройки установлены, жмем на кнопку «OK».
Разбор результатов анализа
Результаты регрессионного анализа выводятся в виде таблицы в том месте, которое указано в настройках.
Одним из основных показателей является R-квадрат. В нем указывается качество модели. В нашем случае данный коэффициент равен 0,705 или около 70,5%. Это приемлемый уровень качества. Зависимость менее 0,5 является плохой.
Ещё один важный показатель расположен в ячейке на пересечении строки «Y-пересечение» и столбца «Коэффициенты». Тут указывается какое значение будет у Y, а в нашем случае, это количество покупателей, при всех остальных факторах равных нулю. В этой таблице данное значение равно 58,04.
Значение на пересечении граф «Переменная X1» и «Коэффициенты» показывает уровень зависимости Y от X. В нашем случае — это уровень зависимости количества клиентов магазина от температуры. Коэффициент 1,31 считается довольно высоким показателем влияния.
Как видим, с помощью программы Microsoft Excel довольно просто составить таблицу регрессионного анализа. Но, работать с полученными на выходе данными, и понимать их суть, сможет только подготовленный человек.
R Square | Significance F and P-Values | Coefficients | Residuals
This example teaches you how to run a linear regression analysis in Excel and how to interpret the Summary Output.
Below you can find our data. The big question is: is there a relation between Quantity Sold (Output) and Price and Advertising (Input). In other words: can we predict Quantity Sold if we know Price and Advertising?
1. On the Data tab, in the Analysis group, click Data Analysis.
Note: can’t find the Data Analysis button? Click here to load the Analysis ToolPak add-in.
2. Select Regression and click OK.
3. Select the Y Range (A1:A8). This is the predictor variable (also called dependent variable).
4. Select the X Range(B1:C8). These are the explanatory variables (also called independent variables). These columns must be adjacent to each other.
5. Check Labels.
6. Click in the Output Range box and select cell A11.
7. Check Residuals.
8. Click OK.
Excel produces the following Summary Output (rounded to 3 decimal places).
R Square
R Square equals 0.962, which is a very good fit. 96% of the variation in Quantity Sold is explained by the independent variables Price and Advertising. The closer to 1, the better the regression line (read on) fits the data.
Significance F and P-values
To check if your results are reliable (statistically significant), look at Significance F (0.001). If this value is less than 0.05, you’re OK. If Significance F is greater than 0.05, it’s probably better to stop using this set of independent variables. Delete a variable with a high P-value (greater than 0.05) and rerun the regression until Significance F drops below 0.05.
Most or all P-values should be below below 0.05. In our example this is the case. (0.000, 0.001 and 0.005).
Coefficients
The regression line is: y = Quantity Sold = 8536.214 -835.722 * Price + 0.592 * Advertising. In other words, for each unit increase in price, Quantity Sold decreases with 835.722 units. For each unit increase in Advertising, Quantity Sold increases with 0.592 units. This is valuable information.
You can also use these coefficients to do a forecast. For example, if price equals $4 and Advertising equals $3000, you might be able to achieve a Quantity Sold of 8536.214 -835.722 * 4 + 0.592 * 3000 = 6970.
Residuals
The residuals show you how far away the actual data points are fom the predicted data points (using the equation). For example, the first data point equals 8500. Using the equation, the predicted data point equals 8536.214 -835.722 * 2 + 0.592 * 2800 = 8523.009, giving a residual of 8500 — 8523.009 = -23.009.
You can also create a scatter plot of these residuals.
Download Article
Download Article
Regression analysis can be very helpful for analyzing large amounts of data and making forecasts and predictions. To run regression analysis in Microsoft Excel, follow these instructions.
-
1
If your version of Excel displays the ribbon (Home, Insert, Page Layout, Formulas…)
- Click on the Office Button at the top left of the page and go to Excel Options.
- Click on Add-Ins on the left side of the page.
- Find Analysis tool pack. If it’s on your list of active add-ins, you’re set.
- If it’s on your list of inactive add-ins, look at the bottom of the window for the drop-down list next to Manage, make sure Excel Add-Ins is selected, and hit Go. In the next window that pops up, make sure Analysis tool pack is checked and hit OK to activate. Allow it to install if necessary.
-
2
If your version of Excel displays the traditional toolbar (File, Edit, View, Insert…)
- Go to Tools > Add-Ins.
- Find Analysis tool pack. (If you don’t see it, look for it using the Browse function.)
- If it’s in the Add-Ins Available box, make sure Analysis tool pack is checked and hit OK to activate. Allow it to install if necessary.
Advertisement
-
3
Excel for Mac 2011 and higher do not include the analysis tool pack. You can’t do it without a different piece of software. This was by design since Microsoft does not like Apple.
Advertisement
-
1
Enter the data into the spreadsheet that you are evaluating. You should have at least two columns of numbers that will be representing your Input Y Range and your Input X Range. Input Y represents the dependent variable while Input X is your independent variable.
-
2
Open the Regression Analysis tool.
- If your version of Excel displays the ribbon, go to Data, find the Analysis section, hit Data Analysis, and choose Regression from the list of tools.
- If your version of Excel displays the traditional toolbar, go to Tools > Data Analysis and choose Regression from the list of tools.
-
3
Define your Input Y Range. In the Regression Analysis box, click inside the Input Y Range box. Then, click and drag your cursor in the Input Y Range field to select all the numbers you want to analyze. You will see a formula that has been entered into the Input Y Range spot.
-
4
Repeat the previous step for the Input X Range.
-
5
Modify your settings if desired. Choose whether or not to display labels, residuals, residual plots, etc. by checking the desired boxes.
-
6
Designate where the output will appear. You can either select a particular output range or send the data to a new workbook or worksheet.
-
7
Click OK. The summary of your regression output will appear where designated.
Advertisement
Sample Regression Analyses
Add New Question
-
Question
What is the slope in a simple regression data?
The slope is the Beta variable B1 that is a coefficient of the independent variable X. Bo is a constant and the «intercept». Example, Y = Bo + B1X.
-
Question
How do I calculate standard error?
Step 1: Calculate the mean (Total of all samples divided by the number of samples). Step 2: Calculate each measurement’s deviation from the mean (Mean minus the individual measurement). Step 3: Square each deviation from mean. Squared negatives become positive.
-
Question
How can I calculate the equation of a line in regression in Excel?
One quick way to do this is to arrange your X and Y variables in adjacent columns (X on the left), then select the two-column range and use the Insert/Scatterchart command to insert an X-Y scatterchart. Then right-click on the chart, choose Add Trendline from the drop-down menu, and then check the box for Display-Equation-on-Chart. Or, you could use some good software to fit the whole regression model. Try RegressIt, a free add-in (available at regressit-dot-com), It gives very detailed and well-designed output, and among other things it will show the equation for any number of independent variables. Just click the «Show All» button after fitting a model.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
Thanks for submitting a tip for review!
About This Article
Thanks to all authors for creating a page that has been read 1,310,913 times.