Excel

The for writing a chemistry lab using Excel 2007 (or whatever is on this computer) Overview • Identifying the basics • Entering Data • Analyzing Data • Other Cool Things • Examples EXPLORING THE BASICS What are the basics of Excel?

• Each box is called a cell • Cells are identified by a letter and number • Cells store data in different forms – Text – • Fraction • Percentage – Time – Date

What are the basics of Excel?

• The bar where you type your information is called the formula bar • Not only can you enter single bits of information, you can enter mathematical formulas What are the basics of Excel? • To move through the cells – [tab] will move you to the right – [shift][tab] will move you to the left – [enter] will move you down – [shift][enter] will move you up • There are several different sheets in one document. You can use these to organize your data or separate your experiments. INPUTTING DATA How do I enter data?

• Simply type in your data as you see on your data tables – excel will auto format the type of data inputted. • Data shown is the average amount of money each household spends on the stated item within a region How do I calculate data?

• To calculate data, click on the cell where you want the formula applied and hit the = key. This transforms the cell from storing data to storing a formula. Type the formula you want, clicking cells to use the numbers stored in them. • Keep in mind that order of operations still applies. How do I calculate data?

• To repeat a calculation, simply copy the cell with the formula, highlight and paste unto the blank cells. • The formula will match the data in that row or column. How do I calculate data?

• When copying and pasting formulas, to hold a cell constant, use the $ sign in front of the cell name. • This time, when the data is copy and pasted, the “60” will be held constant. How do I calculate data?

• Normal mathematical functions also exist in Excel – Average: average() – Sum: sum() or use the [sigma] button – Or use the +,-,*,/ operations ANALYZING DATA How do I sort data?

• To sort data, highlight the data you want to sort and on the menu bar, select data, then sort. • Then select the column and order you wish to sort. How do I sort data?

Before Sorting After Sorting How do I make a graph from my data?

• Place the x and y data you want on the chart next to each other. Highlight the data and select the type of chart you want to insert. How do I make a graph from my data?

• After clicking the type of graph desired, click on individual parts of the graph to format them. You can change: – Color of the data points – Font and size of labels – Borders, gradients, and fills How do I make a graph from my data?

• To give the graph a title, click on the graph and use the menu layout function. Under the labels section, you can give the graph a title, label the axis, and change the names in the legend. How do I make a graph from my data?

Distance vs Time 30

25

20

15

Meters Distance (m)

10

5

0 0 10 20 30 40 50 60 70 Time (s) How do I add a trend line to my graph?

• With the graph still clicked, under the layout menu and the analysis section, select “Trendline.” How do I add a trend line to my graph?

• To display the intercept and slope of the trend line, right click the line and select “Format Trendline…”. Make sure you select the trendline, not the data points, or the chart backdrop. • Under Trendline Options, select “Display Equation on chart”. How do I add a trend line to my graph? OTHER COOL THINGS How do I export data? • Highlight the desired area and copy and paste with [ctrl][] and [ctrl][v] or [command][c] and [command][v] on a mac. • Take a screen shot with print screen with [fn][prt sc] or [shift][command][3] on a mac. • Save the worksheet as a PDF.

How do I make my charts prettier?

• Accent the header row by bolding or underlining the text. • To isolate a chart, highlight the desired area and under the home menu and the font section, select the border button. How do I make my charts prettier?

• You can also enhance the aesthetics of a chart by using the fill function. To fill a cell, select a sell or group of cells, and hit the fill button under the home menu and the font section. EXAMPLES Where do I find my data?

• Go to http://lib.stat.cmu.e du/DASL/Datafiles/ teacherpaydat.html and copy the section 3 data – or – copy the following into a . What data should I calculate? • For every state shown, based on the average teacher’s salary and the average spending per student: – Calculate the average number of students that each teacher teaches – Round the number of students to the thousandth place What does the calculated data look like? What graph should I make? • Create a scatter plot relating the original data – Use the spending/student as the independent axis – Use the teachers’ salary as the dependent data – Label the data series “West Region” – Add an appropriate title, x axis, and y axis labels – Add a trendline for the data, showing both the equation and regression value How do I make the graph? • Switch columns B and C so the data reads X then Y. • Highlight the data and select insert > charts > scatter. • Select design > data > select data and change the series name from “series 1” to “West Region” • Select layout > labels and name all appropriate labels • Select layout > analysis and give the graph a trendline

What does my graph look like?

Avg Teachers' Salary vs Avg Spending per Student 45000

40000

35000

30000

y = 2.9428x + 14625 25000 ² = 0.803

West Region 20000 Linear (West Region)

Average Average Teachers'Salary 15000

10000

5000

0 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 Average Spendings per Student How do we add more series?

• With the original data, enter a new column for region. Enter “West” next to all the original data. • Additionally, enter the data to the right. What should I add to my current graph? • Plot the data on the same graph (or create a new graph with both data sets). – Add a trendline and a regression for both sets of data – Make sure the legend clearly labels both sets of data What should my new graph look like?

Avg Teachers' Salary vs Avg Spendings per Student 45000

40000

35000 West

30000

25000 North East and North Central

20000

Average Average Teachers'Salary 15000 Linear (West) y = 2.9428x + 14625 10000 R² = 0.803

5000 Linear (North East and North Central) y = 3.5187x + 10695 0 R² = 0.5683 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 Average Spending per Student What can we infer from out data and analysis?

West Region North East and North Central • Regression correlation: R2 value is • Regression correlation: R2 .803 value is .5683 • Implies that there is a relatively • Implies that there is a weak strong correlation correlation • The West is newer, therefore the schools are not as established (no • The North is more established tenure rates, inflation has not been and has more history, so with there as long as in the north or a mix of both old and new east) teachers, the pay may not be as fair What conclusions can we draw? • There is a stronger correlation between teachers’ pay and spending per student in the west as opposed to the north • However, there are other factors such as performance of teachers, tenure, etc that have not been accounted for • With the original data, we can conclude that teachers in the west are being paid according to how much a district spends on each student. We can also infer that the more wealthy school districts pay their teachers better. QUESTIONS? END