Sei sulla pagina 1di 7

Excel Users Guide B

APPENDIX B
MICROSOFT EXCEL USERS GUIDE B
Summary of Excel Procedure in MBA 611 Lecture Notes
A. Basic Statistics
Installation of Add-ins: you need to install several Excel add-ins for this course.
i.

ii.

You will need to use Dada Analysis for most basic statistics. If Data Analysis is not
available, click File tab, Options. Click Add-ins. Click Go next to Manage: Excel
Add-ins. Check Analysis ToolPak, Analysis ToolPak-VBA, PHStat2, Solver Addin.
If PHStat2 is not available on the Add-ins list, you need to download PHStat from
http://www.pearsonhighered.com/newbold/. It is under "Statistics for Business and
Economics, 8/E." Install this software before you can add this add-in. If this add-in is
still not on the list, click Browse and locate PHStat2 and select this file. This file is in
C:\Program Files\PHStat2 or C:\Program Files (x86).

1.
2.
3.
4.

Create a Histogram
Click on Data tab.
Click on Data Analysis.
Select Histogram; click OK.
Complete dialog box: Input range contains data; Bin range (optional) contains upper
boundary of each interval; click OK.

A.1

A.2

Create a Line Graph


Select the data. Dont select the labels, such as dates, for the horizontal axis.
Click on Insert tab.
Click on Line in Charts group.
Select Line and the top-left line chart.
Under Chart Tools tab, click Layout tab. Click Chart Title and Axis Titles in Labels
group to add title and labels.
6. Under Chart Tools tab, click Design tab. Click Select Data in Data group.
7. In Select Data Source window, Click Edit under Horizontal (Category) Axis Labels.
8. Select the range of actual labels, such as dates, for the Axis label range field.
1.
2.
3.
4.
5.

A.3
1.
2.
3.
4.

Descriptive Statistics
Click on Data tab.
Click on Data Analysis.
Select Descriptive Statistics; click OK.
Complete dialog box: Input range contains data; Output range contains the starting cell
with descriptive statistics; select Summary statistics. Click OK.

311

Excel Users Guide B


A.4
Confidence Interval for Population Mean
The t-statistic is close to standard normal random variable. You can use the following procedure
for both small and large samples.
1. Click on Data tab.
2. Click on Data Analysis in Analysis group.
3. Select Descriptive Statistics; click OK.
4. Complete dialog box: Input range contains cell address of data values; Output range
contains the top-left cell address of the output with descriptive statistics; select
Summary statistics and Confidence Level for Mean; click OK.
s
.
5. The value for Confidence Level (95.0%) is the value of t 0.025
n
A.5
Testing the Population Mean with a Large Sample
You can use one of the following procedures to get the p-value of a z-test.
i. If you know the value of z*, you can use A=norm.s.dist@ function to get the p-value.
=1 norm.s.dist(z, true).
Example:
=1 norm.s.dist(2.81, true)
This returns the value 0.0025.
ii. Use Insert Function.
Step 1. Select a blank cell.
Step 2. Click on Formula tab.
Step 3. Click Insert Function in Function Library group.
Step 3. Under Insert Function window: or select a category, select Statistical; for
Select a function, select ZTEST; click OK.
Step 4. Complete dialog box for Function Arguments window: Array contains cell
address of data values; X contains the population mean value under the null
hypothesis; click OK.
Step 5. The resulting value for this function is the p-value for the two-tailed test.
iii. The above procedure gives ZTEST statement as below.
=ztest(array, mean value under the null hypothesis, standard deviation)
Or
=ztest(array, mean value under the null hypothesis)

312

Excel Users Guide B


A.6

Testing the Population Mean using PHStat

i. Use Excel to get the p-value for small sample t-test.


=t.dist.rt(t*, df)
This returns the probability on the right-tailed of t*.
Example:
=t.dist.rt(0.391, 5)
This returns the value 0.3559.
ii. Use PHStat
Step 1. Click on Add-ins tab and click on PHStat
Step 2. Click on One-Sample Tests.
Step 3. Click on t Test for the Mean, sigma unknown.
Step 4. Complete dialog box.
A.7

Compare Two Means with Dependent Samples

i. Use Data Analysis Tool


Step 1. Click on Data tab.
Step 2. Click on Data Analysis in Analysis group.
Step 3. Select T-Test: Paired Two Samples for Means; click OK.
Step 4. Complete dialog box: Variable 1 Range contains cell address of the first set of
sample data values; Variable 2 Range contains cell address of the second set of
sample data values; Hypothesized Mean Difference contains the difference of the
mean, 0; Alpha contains 0.05. Output range contains the top-left cell address of
the output; click OK.
ii. You can also use TTEST function to get the t-test for two dependent samples and for two
independent samples. However, the Data Analysis tool is easier to use. Note that tstatistic is close to the standard normal random variable when the sample size is large.
We can always use t-test for large samples.

313

Excel Users Guide B


A.8

Compare Two Means with Two Large Independent Samples


(Assuming unequal variances)

i. Use Data Analysis Tool when the population variances are unknown.
Step 1. Click on Data.
Step 2. Click on Data Analysis in Analysis group.
Step 3. Select T-Test: Two Samples Assuming Unequal Variances; click OK.
Step 4. Complete dialog box: Variable 1 Range contains cell address of the first set of
sample data values; Variable 2 Range contains cell address of the second set of
sample data values; Hypothesized Mean Difference contains the difference of the
mean, 0; Alpha contains 0.05. Output range contains the top-left cell address of
the output; click OK.
ii. Use Data Analysis Tool when the population variances are known. When the population
variances are unknown and you have large samples, you can replace the population
variances by the sample variances.
Step 1.
Click on Data tab.
Step 2.
Click on Data Analysis in Analysis group.
Step 3.
Select Z-Test: Two Samples for Means.
Step 4.
Complete dialog box.
iii. You can also use TTEST function to get the p-value for the test. Use 3 for Type. Note that
you can use t-test even if you have large samples.
A.9
1.
2.
3.
4.

Compare Two Means with Two Small Independent Samples


(Assuming the two populations have the same Population Variances)
Click on Data tab.
Click on Data Analysis in Analysis group.
Select T-Test: Two Samples Assuming Equal Variances; click OK.
Complete dialog box: Variable 1 Range contains cell address of the first set of sample
data values; Variable 2 Range contains cell address of the second set of sample data
values; Hypothesized Mean Difference contains the difference of the mean, 0; Alpha
contains 0.05. Output range contains the top-left cell address of the output; click OK.

Alternatively, you can also use TTEST function to get the p-value for the test. Use 2 for Type.
Note that you can only use t-test if you have small samples.
B. Regression
B.1
1.
2.
3.
4.
5.

Create a Scatter Diagram


Select the data values of x and y. The values of x should be in the first column.
Click on Insert tab.
Click on Scatter in Charts group.
Select top-left scatter chart; click Next.
Under Chart Tools, click Layout. Click Chart Title and Axis Titles in Labels group to
add title and labels.
314

Excel Users Guide B


B.2

Covariance and Correlation


1. Select a blank cell and type A=covariance.s(x array, y array)@ for sample covariance.
2. Select a blank cell and type A=correl(x array, y array)@ for correlation.
3. Excel function =covarirance.p() gives the population covariance instead of sample
covariance.

B.3
1.
2.
3.
4.
B.4
1.
2.
3.
4.

B.5

Linear Regression
Click on Data tab.
Click on Data Analysis in Analysis group.
Select Regression; click OK.
Complete dialog box.
Linear Regression Prediction Using PHStat
Click on Add-ins tab and click on PHStat.
Click on Regression.
Click on Simple Linear Regression.
Complete dialog box.

Select Y Variable Cell Range;

Select X Variable Cell Range;

Check the box for Confidence and Prediction Interval for X=

Type the given value of X.

Type the level of confidence "95."

Multiple Regression Prediction using PHStat


Click on Add-ins tab and click on PHStat.
Click on Regression.
Click on Multiple Linear Regression.
Complete dialog box.

Select Y Variable Cell Range.

Select X Variable Cell Range

Check the box for Confidence and Prediction Interval.

Type the level of confidence "95."

Click OK.
5. Type the given values of x=s.
1.
2.
3.
4.

B.6
1.
2.
3.
4.

Correlation Matrix
Click on Data tab.
Click on Data Analysis in Analysis group.
Select Correlation.
Enter the range of independent variables.

315

Excel Users Guide B


B.7
1.
2.
3.
4.
5.
6.
7.

B.8

Testing Heteroscedasticity
Click on Data tab. Click on Data Analysis in Analysis group.
Click Regression.
After enter Y and X ranges, check the box Residuals and put the output on a new
worksheet. Then the residuals are in the regression results worksheet.
Use Excel formula to generate the squares of residuals, x1, x2, ..., squares of x1 squares
of x2, ..., x1*x2, x1*x3, x2*x3, ... The square function is "^2". For example, "=c2^2".
C lick on Data tab. Click on Data Analysis in Analysis group.
Click Regression.
Enter the squares of residuals for the Y range, and x1, x2, ..., squares of x1, squares of
x2, ..., x1*x2, x1*x3, x2*x3, ... for X range. Run the regression to get the R-squared
for the 2 test.

1.
2.
3.
4.
5.

Durbin-Watson Statistic Using PHStat


Click on Add-ins tab and click on PHStat.
Click on Regression ...
Click on Simple Linear Regression ... or Multiple Linear Regression ...
Check ANOVA and Coefficients Table under Regression Tool Output Options
Check ADurbin-Watson Statistic@ under Output Options before complete dialog box.

1.
2.
3.
4.

Generate time trend for regression


Type 1 and 2 on cells D2 and D3.
High-light cells D2 and D3.
Point the mouse cursor to the right-bottom corner.
Drag the cursor to the end of the D column.

B.9

C. Analysis of Variance
C.1
1.
2.
3.
4.

C.2
1.
2.
3.
4.

One-Way Analysis of Variance


Click on Data tab.
Click on Data Analysis in Analysis group.
Select Anova: Single Factor; click OK.
Complete dialog box: Input range contains cell address of data values; Alpha contains
0.05; Check Columns if the grouped data are in columns; Check Label in first row if
the data are labeled in first rows; Check Output Range; Output Range contains the
top-left cell address of the output; click OK.
Two-Way Analysis of Variance
Click on Data tab.
Click on Data Analysis in Analysis group.
Select Anova: Two Factors -Without Replication; click OK.
Complete dialog box: Input range contains cell address of data values; Alpha contains
0.05; Check Label in first row if the data are labeled in first rows; Check Output
Range; Output Range contains the top-left cell address of the output; click OK.

316

Excel Users Guide B


D. Linear Programming
D. 1

Using Solver for Linear Programming

Launching Solver:
Click on Data tab.
Click on Solver in Analysis group.

Specifying Solver Parameters:


Select Objective Function in Target Cell
Choosing Max or Min
Identifying Decision Variables in Changing Cells
Adding Constraints
Click Add.
Select cells of totals (LHS).
Select the relational symbol (, , ).
Select cells of constraints (RHS).
Click OK.
Check the box for Make Unconstrained Variables Non-negative
For Select a solving method, select Simplex LP
Click Solve

Solver Reports
Select Answer Report
Click OK.

317