Excel Guide Appendix B

7
Excel User’s Guide B 311 APPENDIX B MICROSOFT EXCEL USER’S 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. 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 Add- in. ii. 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). A.1 Create a Histogram 1. Click on Data tab. 2. Click on Data Analysis. 3. Select Histogram; click OK. 4. Complete dialog box: Input range contains data; Bin range (optional) contains upper boundary of each interval; click OK. A.2 Create a Line Graph 1. Select the data. Don’t select the labels, such as dates, for the horizontal axis. 2. Click on Insert tab. 3. Click on Line in Charts group. 4. Select Line and the top-left line chart. 5. 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. A.3 Descriptive Statistics 1. Click on Data tab. 2. Click on Data Analysis. 3. Select Descriptive Statistics; click OK. 4. Complete dialog box: Input range contains data; Output range contains the starting cell with descriptive statistics; select Summary statistics. Click OK.

description

Excel functions for statistical computations.

Transcript of Excel Guide Appendix B

  • Excel Users Guide B

    311

    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. 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 Add-in.

    ii. 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).

    A.1 Create a Histogram

    1. Click on Data tab. 2. Click on Data Analysis. 3. Select Histogram; click OK. 4. Complete dialog box: Input range contains data; Bin range (optional) contains upper

    boundary of each interval; click OK. A.2 Create a Line Graph

    1. Select the data. Dont select the labels, such as dates, for the horizontal axis. 2. Click on Insert tab. 3. Click on Line in Charts group. 4. Select Line and the top-left line chart. 5. 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.

    A.3 Descriptive Statistics

    1. Click on Data tab. 2. Click on Data Analysis. 3. Select Descriptive Statistics; click OK. 4. Complete dialog box: Input range contains data; Output range contains the starting cell

    with descriptive statistics; select Summary statistics. Click OK.

  • Excel Users Guide B

    312

    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.

    5. The value for Confidence Level (95.0%) is the value of n

    s t 025.0 . 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)

  • Excel Users Guide B

    313

    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 t-statistic is close to the standard normal random variable when the sample size is large. We can always use t-test for large samples.

  • Excel Users Guide B

    314

    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 Compare Two Means with Two Small Independent Samples (Assuming the two populations have the same Population Variances)

    1. Click on Data tab. 2. Click on Data Analysis in Analysis group. 3. Select T-Test: Two Samples Assuming Equal Variances; click OK. 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.

    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 Create a Scatter Diagram

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

    add title and labels.

  • Excel Users Guide B

    315

    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 Linear Regression

    1. Click on Data tab. 2. Click on Data Analysis in Analysis group. 3. Select Regression; click OK. 4. Complete dialog box.

    B.4 Linear Regression Prediction Using PHStat

    1. Click on Add-ins tab and click on PHStat. 2. Click on Regression. 3. Click on Simple Linear Regression. 4. 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."

    B.5 Multiple Regression Prediction using PHStat

    1. Click on Add-ins tab and click on PHStat. 2. Click on Regression. 3. Click on Multiple Linear Regression. 4. 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. B.6 Correlation Matrix

    1. Click on Data tab. 2. Click on Data Analysis in Analysis group. 3. Select Correlation. 4. Enter the range of independent variables.

  • Excel Users Guide B

    316

    B.7 Testing Heteroscedasticity 1. Click on Data tab. Click on Data Analysis in Analysis group. 2. Click Regression. 3. 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. 4. 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". 5. C lick on Data tab. Click on Data Analysis in Analysis group. 6. Click Regression. 7. 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.

    B.8 Durbin-Watson Statistic Using PHStat

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

    B.9 Generate time trend for regression

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

    C. Analysis of Variance C.1 One-Way Analysis of Variance

    1. Click on Data tab. 2. Click on Data Analysis in Analysis group. 3. Select Anova: Single Factor; click OK. 4. 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.

    C.2 Two-Way Analysis of Variance

    1. Click on Data tab. 2. Click on Data Analysis in Analysis group. 3. Select Anova: Two Factors -Without Replication; click OK. 4. 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.

  • Excel Users Guide B

    317

    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.