Name ______________________________________________ Date: Jan. 2014 IB Math Studies – Computer Lab #2 Please read through this Computer Lab patiently and thoroughly. Many questions you may have are answered in this document. You have two class days to complete the assignments contained in this Lab. When complete, you will print and turn in 1 page: a single sheet, printed from a Microsoft Word document, including the answers to the questions in the assignment on the back of this page. This lab is designed for further practice using Microsoft Excel, including calculating correlation for a data set, and creating a scatterplot with a linear regression line to show a visual picture of two numerical variables. I. To open the Microsoft Excel program, follow “Start> All Programs> Microsoft Office> Microsoft Excel.” A new, clean spreadsheet should open up. II. Open “Microsoft Word” today, as well. You will be copying and pasting results from Excel into a Word document to print at the end of the period. III. Performing Calculations. Excel has many built-in formulas that it can use to make your life easier. Today, you will look at formulas in Excel that include correlation, standard deviation, and covariance. A formula always starts by typing “=.” Then you usually click and drag on all your data values for Excel to look at (when calculating the average, finding the minimum, etc.). Some formulas look like this: =CORREL(D2:D78,E2:E78) =AVERAGE(D2:D78) =STDEV.P(D2:D78) -> This will give you the correlation for the height/weight data -> This will give you the average of the heights -> This will give you the standard deviation of the heights (NOTICE: “.P” means the “population standard deviation” – this is the “sigma of x” value that we use, also the 2nd output value in the calculator. There are two ways to calculate standard deviation, and we always use this “population” (instead of “sample”) method! IV. Manipulating Data. CAUTION: IF YOU ONLY HIGHLIGHT SOME ROWS OR COLUMNS, THESE WILL BE SORTED AND EVERYTHING ELSE WILL NOT! HIGHLIGHT THE WHOLE DATA SET WHENEVER YOU SORT. V. Charts and Graphs. Many options are available to present your data in charts and graphs. To make a graph, select (click and highlight) the data you want to show in your graph Then select “Insert>Chart…” and then peruse your options (bar graph, line graph, etc.). Some charts or graphs require special forms of data (for example, “Scatter Plots” require two columns of data, side-by-side, for the x- and y-values). You can play with these charts today, after you’ve completed the Assignment below. VI. Today’s Assignment: A. Histogram: Use the “Insert” tab, and the “Column” chart to make a histogram of the data table on the right. (You have to type the data table into Excel first.) You might adjust the chart options by typing a different title, changing or removing the key, or right-click on different parts of the graph to adjust other options (background color, bar width, etc.) Copy and paste this histogram into your Word document. Interval <9 hours 9-13 hours 14-17 hours 18-21 hours 22-25 hours 26-29 hours 30+ hours Frequency 2 3 3 22 33 9 3 B. Correlation & Scatterplot: Next, acquaint yourself with the Excel formula for calculating Correlation. Since “correlation” calculates the “strength of the linear relationship between two variables,” they way we enter this formula in Excel has TWO LISTS OF DATA. Here is the formula in Excel: =correl(XList,YList) For practice, confirm that when you enter “=correl(D2:D78,F2:F78)”, that you get a value of 0.242. Find the correlation for height/weight data columns, and make a scatterplot showing the relationship between height and weight. Include the value of “r,” as well as the scatterplot for these variables, in your Word Document. For example, the screen shot at the left shows the two columns “Height” and “Weight” next to each other, highlighted as the “XList” and “YList” values, and the choice of “Insert tab > Scatter icon” to make a scatterplot, and the resulting scatterplot. C. Values to use in a Regression Equation: Calculate the values that you need to use for a linear regression equation for weight (y) based on height (x). After you calculate the following values in Excel, copy (and label them) to your Word Document. (Excel formulas for these calculations are given as examples on the front of this page.) Mean of Height, St.Dev. of Height, Mean of Weight, St.Dev. of Weight, and Covariance of Height and Weight D. Other Calculations with Data Values: Lastly, create a new column in your data table. Label it “BMI.” This stands for “Body Mass Index,” and this number is used to determine a healthy weight for a given height. BMI is calculated by the formula BMI = (Weight, in lbs.)*703/(Ht. in inches, squared). Study the screen shot at the right to see how to enter this formula into a new column for one specific survey value. To copy this formula for all 70+ surveys, click and drag in the lower right corner of the cell containing the formula. Drag it down to all 70+ rows of the data set. For the last part of your assignment today, calculate the BMI for all individuals in the survey. You’ll see some errors – some values of 0 or “#Div/0!” – and you want to delete these before you do the next calculation. Then calculate the average of the BMI values, and copy this value (and label it) into your Microsoft Word document.