December 2008

advertisement
MA310 2008-9 Excel question sheet 2 (assessed)
Due on or before noon on Friday December 19, 2008.
Please submit your attempts at these questions to the IMSAS General Office and obtain a receipt.
PLEASE NOTE THE FOLLOWING:
1. Fasten all sheets together either with a staple or a paper clip (no plastic envelopes please).
2. Hand in a print-out of a Word document only, not Excel print-outs or disks.
3. The material that you hand in should be your own work. In particular, when you are asked
for explanations or comments these should be in your own words, not those of other students or
the handouts.
************************************************
The data used in this assessment are in the file cpwages.xls stored on Dr. Gavin Brown’s web page
http://www.kent.ac.uk/IMS/personal/gdb/index.html. The data file contains 534 observations on 11
variables sampled from the Current Population Survey of 1985. The variable names are included at the
top of the file.
The variables in order from left to right are:
educ: Number of years of education.
south: Indicator variable for Southern Region (1=Person lives in South, 0=Person lives elsewhere).
sex: Indicator variable for sex (1=Female, 0=Male).
exper: Number of years of work experience.
union: Indicator variable for union membership (1=Union member, 0=Not union member).
wage: Wage (dollars per hour).
age: Age (years).
race: Race (1=Other, 2=Hispanic, 3=White).
occup: Occupational category (1=Management, 2=Sales, 3=Clerical, 4=Service, 5=Professional,
6=Other).
sector: Sector (0=Other, 1=Manufacturing, 2=Construction).
marr: Marital Status (0=Unmarried, 1=Married)
1.(i) Open a new file in Word and type your full name and email address and “MA310 Excel
assessment" as a header. Put answers to the questions below into this file, as directed.
(ii) Download and save the file cpwages.xls into your own area and open it in Excel.
2. (i) Use Excel to obtain a one-way table showing the average wages (to 2 decimal places) of males
and females. Edit the table to replace the codes by words and paste the table into your Word file.
[2 marks]
(ii) On the basis of this table, do men and women appear to receive about the same wages on average?
Justify your answer.
[1 mark]
3. Find the differences age of respondents minus the number of years of experience each has had. Use
Excel functions to obtain the minimum difference, the maximum difference, and (to 1 decimal place)
the average difference. In your Word file state the formulae you used to obtain these quantities and the
values of the minimum, maximum, and average.
[3 marks]
Turn over for remaining questions
4. (i) Replace the occupational category codes in column I by the descriptions of the category. In your
Word file, explain how you did this.
[3 marks]
(ii) Obtain a table to show the average wage (to 2 decimal places) in each occupational category for
each of male and female respondents, and for all respondents. Paste the table into your Word file.
[2 marks]
(iii) In Excel adjust the table you obtained in (ii) to show, for each of males and females, and for all
respondents, the percentage of respondents in each occupational category. Explain, in your Word file,
how you did this. Paste the table into your Word file.
[3 marks]
(iv) Comment briefly on the main points shown in the tables obtained in parts (ii) and (iii).
[3 marks]
5.(i) What is your date of your birthday written in the form date followed by the month given as 2
integers (examples: 10 January is 1001, 5 October is 510)? This is to be used in 5(ii).
(ii) Using the date of your birthday as written in 5(i) as a random seed, generate, in a column in the
worksheet obtained in question 4, 20 random numbers from the uniform distribution with parameters
between 2 and n where n is the row number containing the last observation. Decrease the decimal to
show just the integer part of these. Now obtain, in two columns, lined up with your column of random
numbers, the values of exper and age corresponding to these entries. For example, if one of your
random numbers is 65.1504, it should show as 65 after decreasing the number of decimal places, and
you need to find the values of the variables in row 65. Copy and paste the three columns that you have
obtained into your Word file.
Note that the chance that you share a birthday with another student, in the group is very small. By
stating the seed that you use it is possible to check that you have generated random numbers correctly.
[4 marks]
(iii) Use the Excel Chart procedure to produce a scatter diagram of exper on the vertical axis and age
on the horizontal axis for your random sample of 20 pairs of observations of these variables. Make
sure that the axes are labelled, give the diagram a meaningful title, rescale the axes if necessary and
delete the legend. Paste the diagram into your Word file. Comment briefly on the relationship between
the two variables shown in your diagram.
[4 marks]
6. Check that everything in your Word file is legible and is within the print area. Make sure that the
cell contents of all tables are correctly described. Hint: The tables can be edited within Word. Print out
this file for assessment. You will lose 1 mark from your total mark if your presentation is very poor.
Flavia Jolliffe
December 2008
Download