You are on page 1of 8

Microsoft Excel

Qi Wei

Excel (Microsoft Office Excel) is a 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 VBA (Visual Basic for Applications). Excel can produce very high quality (publication-ready) graphics in plotting data. For example, the following figure shows the curve for y=x2.

Excel included a lot of statistical functions. In this report, we will show some examples.

Linear regression modeling: First, we need to enter the data into an Excel
spread sheet, plot the data, create a trendline and display its slope, y-intercept and Rsquared value.

Non-linear modeling: Excel can do a lot of non-linear modeling. Here is an


example:

Histogram: Excel can plot histogram. Here is an example: with all input data
in the right place, you are ready to start the Histogram tool. Simply click Data Analysis on the Tools menu, and then select Histogram. The Histogram dialog box will be displayed.

In the Histogram dialog box, you need to supply the following information: Input range This is the location of the input data in your worksheet. Bin range This is the location of the bins in your worksheet. Output location This would be the upper left cell of the range where you want the analysis to appear. Display of the output: Chart Output is selected. You can also sort the output or display it in cumulative percentages.

QQ-plot: QQ plot is not easy in excel, but it can be done. Here are steps: (1) Place or
load your data values into the first column. Leave the first row blank for labeling the columns. Sort the data in ascending order (look under the Data menu). (2) Label the second column as Rank. Enter the ranks, starting with 1 in the row right below the label. Each following row will be one more than the last (note: you can use an expression, copy and then paste to save you time) (3) Label the third column as Rank Proportion. This column shows the rank proportion of each value. Use this expression for the first data value =(b2 - 0.5) / count(b$2:b$N) where N should have the row number of the last cell. Finish the column by copying the first data expression to the remaining rows. Check to make sure your percentiles look like they are correct! (4) Label the fourth column as Rank-based z-scores. Excel provides these values with the normsinv function. Use this function to create the values in the fourth column. (5) Copy the first column to the fifth column. The Excel chart wizard works better if the x-axis values are just to the left of the y-axis values. (6) Select the fourth and fifth column. Select the chart wizard and then the scatter plot. The default data values should be good, but you should provide good labels.

Continuous/categorical variable analyses: The best way to handle


numeric variables with Excel is the Data Analysis Toolpak. If you click on Data Analysis, and you'll see a window like this:

Enter data in an Excel work sheet. The following steps should be taken to find the proper output for interpretation. Step 1. From the menus select Tools and click on Data Analysis option. Step 2. When data analysis dialog appears, choose the statistical method you want; fill the range box. Select labels in first row. Step3.Select any cell as output. Click OK.

Chi-squared testing: Excel can do Chi-square test. Here are the steps:
Step 1.Select a cell in the work sheet, the location which you like the p value of the CHISQUARE to appear.
3

Step 2. From the menus, select insert then click on the Function option, Paste Function dialog box appears. Step 3.Refer to function category box and choose statistical, from function name box select CHITEST and click on OK. Step 4.When the CHITEST dialog appears: Fill the actual-range box and the expected-range box, and finally click on OK. The p-value will appear in the selected cell.

Reading in multiple data formats: Reading or entering data into Excel is very convenient. It can open all kinds of text data files directly. Click Open, then choose the data file and click Open again. Data manipulation: Excel is very powerful and convenient in data manipulation.
There are all kinds of build-in functions. In order to do the data manipulation, first select a cell then type the function you want and fill in the cell position for the original data.

If you dont know the name for the function, you can use the inserting function. The first step in inserting a function is to choose a cell to contain the function result. Once you select a cell, display the Insert Function dialogue box by clicking the fx button next to the formula bar. You can also choose the Insert Function button from the Formulas Ribbon.

The Insert Function dialogue box lets you select functions by category via a drop down list. The Help on This Function link is also available if you need clarification on the use of a selected function

Once you choose a function you can click OK to move to the next step: the Function Arguments box. Finish the Function Arguments box and click OK, you will get the results.

PCA/factor analysis: PCA is a build in function in XLSTAT. Once XLSTATPro is activated, select the XLSTAT/Analyzing data/Principal components analysis command, or click on the corresponding button of the "Analyzing Data" toolbar (see below).

The Principal Component analysis dialog box will appear.

We can do Factor analysis in similar way: After opening XLSTAT, select the XLSTAT/Analyzing data/Factor analysis command, or click on the corresponding button of the "Analyzing data" toolbar (see below).
5

Once you've clicked on the button, the Factor analysis dialog box appears.

Sample size calculations: This is a function in the plug-in QI Macros for Excel.
When you click on QIMacros-Sample Size Calculator for Lean Six Sigma and Analysis Tools and select Sample Size Calculator, you should see the following:

The defaults are set to standard parameters:


95% confidence level +5% (0.05) confidence interval Variable data with standard deviation of (0.167). (Change this value to 0.5 for attribute data.)

General data manipulation: Excel has many general data manipulation


functions. For example, deleting rows/columns or transpose data arrays, To delete multiple rows, 1. In the row header, select the number of rows you want to delete from the worksheet. 2. Right click on the selected rows . 3. Choose Delete from the menu. 4. The rows will be deleted. Here is an another example to transpose data arrays. Start by selecting and copying your entire data range. Click on a new location in your sheet, then go to Edit | Paste Special and select the Transpose check box, as shown in Figure A. Click OK, and Excel will transpose the column and row labels and data, as shown in Figure B. C.

Figure B

Figure A

Smooth: SMOOTH is an array function. This means it operates on a collection of data within a row or column (or array of rows and columns) and its result is an array of the same size. To accomplish this, you first select the array where the result will go, you type the function name and its arguments in the formula line, and then you press CtrlShift-Enter to complete the formula (rather than the usual Enter). Excel will confirm this by putting the formula in braces {}.
For example, to smooth the series of numbers in cells B2 through B30 with the 3RSSH smoother, you would type =SMOOTH(B2:B30, "3RSSH") after selecting cells B2 through B30. The formula will appear in Excel as {=SMOOTH(B2:B30, "3RSSH")}. When the selection is a portion of a single row, SMOOTH will operate as expected and smooth the sequence across the row.

In summary, Excel is very powerful in mathematical/statistical calculation and


graphing. There are also a lot of add-on statistical packages for Excel. For example, Analyse-it , SigmaXL , SPC XL, StatEL , XLfit, etc. We can find most of the statistical functions we need in these packages.

You might also like