tsai & wardell creating individualized data sets for student

13
Creating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic Weiyu Tsai Don G. Wardell Management Department David Eccles School of Business University of Utah 1645 E. Campus Center Dr. #106 Salt Lake City, Utah 84112-9304 [email protected] [email protected] Abstract In this paper we describe an approach that utilizes Excel macros to help OR/MS instructors to enhance and assess their students' learning. We begin by explaining a specific macro, Data Generator, which mainly helps statistics instructors to create assignment questions where numbers or data sets used in the questions are randomly generated according to the instructions specified by instructors. Because of the potentially narrow application range of our particular macro, we also describe an approach that can be used for more general questions. For the most part, this more general approach requires simply recording a macro and then pasting a few other in- structions into the resulting code to make the recorded macro more user-friendly. We also provide a suggested procedure to help instructors to grade the students' answers automatically. 1. Introduction In order to improve and assess a student's skill in solving numeric problems, our preference is to ask questions that require students to analyze data and subsequently reach conclusions. This is especially true for instructors who teach quantitative courses such as business statistics, data analysis, and optimization in a large class setting. Asking such questions in class is sometimes impractical because a computer and a sig- nificant amount of time are required to answer them. Consequently it becomes desirable to create take-home assignments, quizzes and exams. Unfortunately, take- home assignments are susceptible to undesirable col- laboration, which may cause the instructor to be reluc- tant to use them (Strickland, 2006). One way to mitigate opportunities for cheating is to provide students with different versions of the assign- ment. It may also be the case that instructors want students to talk about problems, but in the end solve them individually. With different versions, instructors don't need to worry as much about the problem of free-riding and at the same time can encourage stu- dents to discuss homework assignments with their fellow students. In addition, students pay more atten- tion to the material taught in class and learn to be more confident in solving problems. The challenge, however, lies in finding an effective means to provide a wide variety of values in problem sets and exams that allow students to practice and demonstrate these skills. It greatly increases the re- quired administration time and effort from instructors if they choose to manually design different versions of the same assignment question. Moreover, the re- quired time and effort to grade these problem sets and exams increase dramatically. In fact, the potential workload caused one OR/MS professor to lament, "I am considering ... different versions of take-home as- signments for each student (ugh)" (Strickland, 2006). One way to meet the challenge is to automate the process of randomly generating data sets for questions used in quantitative courses. In fact, using computer programs to resolve this challenge is not new. Indeed, the advent of computers has created many opportuni- ties for testing student knowledge that were heretofore unavailable. These opportunities have come in the form of types of questions that were impractical in the past, as well as in the form of exams that can be tai- © INFORMS ISSN: 1532-0545 136 INFORMS Transactions on Education 7:1(136-148) TSAI & WARDELL Creating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

Upload: others

Post on 03-Feb-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Creating Individualized Data Sets for StudentExercises Using Microsoft Excel and Visual Basic

Weiyu TsaiDon G. Wardell

Management Department David Eccles School of BusinessUniversity of Utah

1645 E. Campus Center Dr. #106Salt Lake City, Utah 84112-9304

[email protected]@business.utah.edu

Abstract

In this paper we describe an approach that utilizes Excel macros to help OR/MS instructors to enhance and assesstheir students' learning. We begin by explaining a specific macro, Data Generator, which mainly helps statisticsinstructors to create assignment questions where numbers or data sets used in the questions are randomlygenerated according to the instructions specified by instructors. Because of the potentially narrow applicationrange of our particular macro, we also describe an approach that can be used for more general questions. Forthe most part, this more general approach requires simply recording a macro and then pasting a few other in-structions into the resulting code to make the recorded macro more user-friendly. We also provide a suggestedprocedure to help instructors to grade the students' answers automatically.

1. Introduction

In order to improve and assess a student's skill insolving numeric problems, our preference is to askquestions that require students to analyze data andsubsequently reach conclusions. This is especially truefor instructors who teach quantitative courses such asbusiness statistics, data analysis, and optimization ina large class setting. Asking such questions in class issometimes impractical because a computer and a sig-nificant amount of time are required to answer them.Consequently it becomes desirable to create take-homeassignments, quizzes and exams. Unfortunately, take-home assignments are susceptible to undesirable col-laboration, which may cause the instructor to be reluc-tant to use them (Strickland, 2006).

One way to mitigate opportunities for cheating is toprovide students with different versions of the assign-ment. It may also be the case that instructors wantstudents to talk about problems, but in the end solvethem individually. With different versions, instructorsdon't need to worry as much about the problem offree-riding and at the same time can encourage stu-dents to discuss homework assignments with theirfellow students. In addition, students pay more atten-

tion to the material taught in class and learn to be moreconfident in solving problems.

The challenge, however, lies in finding an effectivemeans to provide a wide variety of values in problemsets and exams that allow students to practice anddemonstrate these skills. It greatly increases the re-quired administration time and effort from instructorsif they choose to manually design different versionsof the same assignment question. Moreover, the re-quired time and effort to grade these problem sets andexams increase dramatically. In fact, the potentialworkload caused one OR/MS professor to lament, "Iam considering ... different versions of take-home as-signments for each student (ugh)" (Strickland, 2006).

One way to meet the challenge is to automate theprocess of randomly generating data sets for questionsused in quantitative courses. In fact, using computerprograms to resolve this challenge is not new. Indeed,the advent of computers has created many opportuni-ties for testing student knowledge that were heretoforeunavailable. These opportunities have come in theform of types of questions that were impractical in thepast, as well as in the form of exams that can be tai-

© INFORMS ISSN: 1532-0545136INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

About this document
This document has been generated from XSL (Extensible Stylesheet Language) source with RenderX XEP Formatter, version 3.8.4 Client Academic. For more information about XSL, visit the official World Wide Web Consortium XSL homepage: http://www.w3.org/Style/XSL For more information about RenderX and XEP, visit the RenderX site: http://www.renderx.com

lored to meet the needs of the person taking them(Wainer,2000).

Computer-based testing (CBT) utilizes questions inseveral formats including multiple choice, true/false,fill-in-the-blank, short answer, essay, calculated anddrag and drop. The calculated questions are mostsimilar to what we are proposing in this article becausethey provide each examinee his or her own input val-ues. In other words, the algorithmically generatedquestions are those where the computer randomlyselects (from a pre-specified range) values for inputnumbers. Students are then asked to manipulate theinput values to determine output values. Based on thecorrect formula supplied by the instructor, the comput-er calculates the correct answer and compares it to thestudent's answer and can provide immediate feedback.

Example providers of e-learning systems for education-al institutions that provide the functionality of gener-ating calculated questions with algorithmic-styledformulae in their on-line course platforms includeWebCT(1), WebAssign(2) ,Blackboard(3), PHGrade As-sist(4), and eCollege(5). Furthermore, there are softwarepackages (such as Respondus 3.0(6), that can be usedfor off-line editing to ease the difficulty of editing di-rectly on-line on these platforms.

Perhaps the most individualized type of CBT is com-puterized adaptive testing (CAT). In CAT, each subse-quent question presented to the examinee depends onher or his performance on previous questions. Thecomputer uses responses to adapt questions so thatitems that are "maximally informative about the exam-inee's ability level are administered" (Hambleton etal.,1991). Hence the computer is used to store test bankitems, to estimate the examinee's ability level and toselect items that are most appropriate for the examinee.

There are several purported advantages of CAT. Theseinclude enhanced security, convenience, efficiency,comfort, accuracy, immediate test scoring and report-

ing, greater test standardization and improved abilityto add and remove test bank items (Prometric FAQ(7)

, Hambleton et al., 1991).

A similar type of testing is referred to as computermastery testing (CMT). In theory, CMT simulates aninteractive oral examination. As with CAT, the com-puter analyzes responses to each section of the examand estimates the probability that the examinee hasmastered a particular subject and therefore how theexamination should proceed(8). Besides Prometric, an-other system that uses CMT is ALEKS(9), which is alearning and testing system that works to make stu-dents proficient in various subjects, including statistics.

Despite the availability of these CBT tools, there areseveral limitations. Obviously, cost is a main concern.Educational institutions have to subscribe to such e-learning systems before their instructors can take theadvantage of the tools. In addition, these e-learningsystems and software alike are limited by the formulasincluded in the algorithmic-styled questions. Suchsystems don't always have statistical functions builtin to allow for automatic grading. Furthermore, atechnical issue arises due to the fact that these random-ly generated values are provided to students on-lineor printed out on paper. Because most business schoolstudents use Excel in quantitative courses, they often-times would have to manually input the generateddata into Excel. Such data entry is tedious and suscep-tible to error.

Finally, Larreamendy-Joerns et al. (2005) argue thatthe benefit that students derive from problem-solvingactivities depends upon the exercises' frequency, cog-nitive complexity and authenticity. The algorithmic-styled exercises described above should allow for ad-equate frequency, but may lack the necessary complex-ity and authenticity. To be cognitively complex, anexercise "requires multiple inferential steps, involvesmultiple possible solutions, and allows for multiplepaths to a solution." Authenticity means that the tasks

(1) http://www.webct.com/(2) http://www.webassign.com(3) http://www.blackboard.com/us/index.aspx(4) http://www.prenhall.com/phga/html/business/index.html(5) http://www.ecollege.com/indexflash.learn(6) http://www.respondus.com/(7) http://www.prometric.com/Candidates/FAQs/TestingQuestions.htm#4(8) http://www.prometric.com/Candidates/FAQs/TestingQuestions.htm#4(9) http://www.aleks.com/about#whatis

© INFORMS ISSN: 1532-0545137INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

assigned to students are similar to those that profes-sionals in the area encounter. We believe that by pro-viding full data sets, rather than just a few input val-ues, the Excel-based procedure that we describe pro-vides students with some of the advantages of cogni-tive complexity and authenticity. It is true that muchof what we propose is algorithmic and asks studentsto perform the somewhat rote tasks of data analysis.However, by providing data sets as complex as theinstructor wants to simulate, students can be engagedin higher levels of problem solving.

In this paper we describe an Excel macro called, "DataGenerator," and provide a generic approach that in-structors can use to create customized data sets thatdo not have most of the drawbacks mentioned above.In section 2, we provide a simple regression questionwe use in our MBA Data Analysis and Decision Mak-ing course. We then describe how instructors can useData Generator to set up a file that can generate datafor this regression question automatically when stu-dents first open the file. Section 3 provides instructionsto grade the question once instructors receive submit-ted files from their students. In section 4, we describea more general algorithm (i.e., one where our macrois not necessary) that can be used to create customizeddata sets. Finally, we conclude in section 5.

2. Creating the Data Set: Instructions forUsing "Data Generator"

In this section we present a motivating example, givethe steps needed to create the customized data set, andexplain how students will use the file.

2.1. Motivating Example

Using a simple regression question discussed in ourMBA Data Analysis and Decision Making course, wedemonstrate how to take advantage of Data Generatorto create customized data files for the students. Thesample scenario is based on an example given in Neter,Wasserman and Kutner (1985) and is as follows.

A marketing manager for a large cafeteria chainwished to investigate sales of coffee. Fourteen cafete-rias that were similar in such respects as volume ofbusiness, type of clientele, and location were chosen

for data collection. Data were collected on sales ofcoffee (in hundreds of gallons and coded as SALES)and the number of coffee dispensers (coded as DIS-PENSE) within the cafeteria.

Students are then asked to fit a regression model tothe data and answer questions about the output.

To make the question set richer, we desired to createthe possibility that the relationship between the vari-ables be nonlinear. Doing so allowed us to test stu-dents' knowledge of curvilinear regression, includingpolynomial regression. By asking the students to per-form polynomial regression, we were able to assesstheir knowledge of multiple regression, includingquestions on testing regression assumptions (i.e.,residual analysis, multicollinearity checks, etc.).

For our example, Data Generator is used to create aworksheet named "Coffee" that contains the input data.In this worksheet, there are two columns of data,SALES and DISPENSE, and each column has 14 datapoints in our example. The variables, SALES andDISPENSE may have a linear, polynomial, logarithmic,or exponential relationship.

2.2. Instructions for Creating the CustomizedData Sets

Instructors can use Data Generator to set up an Excelfile that creates the student worksheet ("Coffee" in ourexample) when opened. The steps for doing so aredescribed below.

1. Upon opening the Data Generator(10) file, instructorssee a worksheet named Data Generator, which is blankexcept for one green START button as shown in Figure1.

Figure 1: Instructor Data Generator Screen

2. Click the green START button. The green buttondisappears and a dialog box, CREATE VARIABLES,

(10) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/DataGenerator.xls

© INFORMS ISSN: 1532-0545138INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

appears. Instructors use this Create Variables dialogbox to provide the desired parameters for the variables,SALES and DISPENSE. One completed sample isshown in Figure 2. In this completed sample, the valueof the variable DISPENSE can be drawn from a Nor-mal, Exponential, or Uniform distribution. The reasonfor the 3 choices is to add variety to the possible datasets that students will see. The relationship betweenSALES and DISPENSE can be linear, polynomial, log-arithmic, or exponential. In other words, there are 12different possible formulae for SALES.

In order to determine starting values and ranges forthe parameters, we typically START with a real ortextbook data set and analyze it. Not only does theanalysis provide starting values, but it makes sure thatthe simulated data reflect numbers that would occurin the actual scenario. For the coffee dispenser exam-ple, Neter, Wasserman and Kutner (1985) had thenumber of dispensers range from 0 to 6. We preferredusing 1 to 7, so selected parameter values that wouldgive us such a range. The original sales values werebetween 600 and 1,200 (hundreds of gallons) based onthe number of the dispensers in a particular store. Wethus set the intercept equal to 550 and then chose theslope and other parameters accordingly to generatesales within the range of 600 and 1,200. Since the expo-nential case is quite different from the others, we madesure to choose the parameters such that the minimalsales were above 600 and that a store with 7 dispensershad about 1,200 (hundred of gallons) of coffee sales.

3. After specifying the desired information for thesetwo variables, there are four buttons at the bottom ofthe dialog box from which instructors can choose. Ex-cel automatically saves the information of the twonewly created variables when the instructor clicks anyof the four buttons. The CREATE NEW Y button isused to create another variable Y, which is not relatedto the current variable Y in any way. The second but-ton ADD NEW X to THIS Y is used to add anotherindependent variable to the current relationship. Thebutton LOAD VARIABLES TO WORKSHEETS cre-ates a new worksheet and adds the created variablesto the worksheet. The last button Take a break willsimply save the newly created variables and exit theVBA macro.

Figure 2: A Completed CREATE VARIABLES DialogBox

4. The macro is designed so that the error term mustbe treated as another variable. In our example, weclicked the button ADD NEW X to THIS Y to enterthe values corresponding to the error term (see thedialog box shown in Figure 3). With three more distri-butions of the error term, totally there are 36 differentpossible combinations of formula for SALES.

Figure 3: A Completed ADD NEW X to THIS Y DialogBox

5. Now we can create the "Coffee" worksheet byclicking the LOAD VARIABLES to worksheets button.The CREATE WORKSHEETS dialog box appearswith the variables we just created shown in the listbox. By typing in the worksheet name ("Coffee" in ourexample-the Error Term should never be selected) andselecting the variables we want displayed in theworksheet (SALES and DISPENSE in our example),we can design the data sheet that students will see. Acompleted dialog box is shown in Figure 4. At thebottom of the dialog box, instructors can use the but-tons to create another worksheet, create more vari-ables, seal the file, or take a break. For example, if weclick the button Take a break, the worksheet "Coffee"is created as shown in Figure 5. The worksheet is not

© INFORMS ISSN: 1532-0545139INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

protected, so it is possible for the instructor to addother information if desired. (For example, the instruc-tor can insert a new column to store numbers in col-umn A as long as the names, SALES and DISPENSE,are in row 1 and all data columns are adjacent to eachother.)

Figure 4: A Completed CREATE WORKSHEETS DialogBox

Figure 5: The 'Coffee' Worksheet

6. On the original worksheet "Data Generator," threenew buttons appear as shown in Figure 6: CONTIN-UE, RENEW FORMULA, and SEAL FILE. TheCONTINUE button brings you back to the CREATEVARIABLES dialog box. The RENEW FORMULAbutton is used for demo purposes to show that DataGenerator does re-generate the underlying formulaefor all created variables that are designed to recalculatenew values. This same mechanism is automaticallytriggered when students open the file and also when-ever the F9 button is pressed(11). Therefore, each stu-dent will not only get a file of different values, but alsothe values come from different sets of underlying for-mulae. The SEAL FILE button is used when the instruc-tor finishes creating all worksheets and is ready to

create the file that the students will open. Upon sealingthe file, all worksheets are hidden except a blankworksheet. At this point, a message box shows up andreminds instructors to save the file using SAVE ASand giving the file a different name so as not to overwritethe original Data Generator. At that point the processof setting up the student file is completed and thesaved file can be distributed to students.

Figure 6: Three Buttons in the Worksheet 'Data Generator'

2.3. Instructions for Students

When a student first opens the file, the student will beinformed that the file contains macros, and will beasked if (s)he wants to enable them or not. The stu-dents should select ENABLE MACROS(12). Once astudent opens the file, Excel automatically unseals thefile, regenerates all formulae and converts all formulaeto values (using the COPY/PASTE SPECIAL/VALUESoption in Excel). The file with the macro then closesand each student is left with a file containing his orher own unique data set. Excel then displays the fol-lowing message: "Your data file is completely generat-ed. Remember to save this TempDataFile.xls file withthe name assigned by your instructor in a specificfolder that you can find it."

3. Grading the Customized Questions

After following the instructions in section 2.3 above,the students are ready to use the data file to answerthe questions on the exam. In order to facilitate thediscussion that follows, we have provided a few sup-plementary files that are explained in more detail inAppendix 1. The files are Final_Part_2.doc(13), whichcontains the test questions given to students as the

(11) If users do not want to have the numbers constantly recalculate, they can select Options from the Tools menu and in the Calculationtab, check the Manual box and uncheck the Recalculate before saving box. Note that choosing these options will prevent all formulasfrom recalculating until the F9 key is pressed.

(12) If the students' Excel security level is set so that it won't open macros, they will need change the security level for macro virus pro-tection using the following steps: (In the Tools menu, point to Macro, and then click Security. Click the Security Level tab, and thenclick the Medium option.

(13) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/Final_Part_2.doc

© INFORMS ISSN: 1532-0545140INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

take-home portion of the exam; final06.xls(14), whichis the student's version of the data generator as ex-plained in section 2.3; and sample_student_final.xls(15),which is an answer file that a student actually submit-ted; and grading_file.xls(16) , which we use to grade thestudents' exams as described in the rest of this section.

Once students complete the exam, we ask that theyturn their spreadsheet files in electronically (we usuallyhave them do so via WebCT). We ask that the file thatthey submit contain a summary sheet with their an-swers (which is described in more detail below andwhich we usually provide). The file sample_student_fi-nal.xls(17) > is an example of what students turn in. Atthat point, we as instructors face the (sometimesmonumental) task of grading the files that the studentshave submitted. As mentioned earlier, an obviousdownside of creating a unique data set for each studentis the time required to grade, as one answer key is notsufficient. Hence it is helpful if the grading procedureis also automated, which we have also done by usingan Excel macro. We have found that the grading isgreatly facilitated by giving students very explicit di-rections on how and where to report their answers(see the cover sheet of Final_Part_2.doc(18) ). In thissection we describe the student instructions and thendescribe the grading macro.

3.1. 3.1 Instructions to Students

When providing the questions on the regressionmodel, we instruct students that they not changeanything about the original data (e.g., don't delete the"Coffee" worksheet; don't move the data to othercolumns or rows). These instructions are necessarybecause the grading macro must copy the students'data into a grading worksheet and hence has to lookfor the data in specific locations(19). We also note tostudents that there are specific instructions as to whereto put their answers. In fact, we have found it helpfulto provide for them a separate worksheet that theycan use to report their answers. Figure 7 and the result

of running the macro in final06.xls(20) show an example"Answer Summary" worksheet.

The answer worksheet can vary in its sophistication.Some of the questions that we use require non-numericresponses. In early attempts of implementing theseassignments, even though we gave students the exactverbiage to use in their responses, they often wouldslightly

Figure 7: Sample Answer Summary Sheet

modify the wording and cause the grading macro toconclude the student response was incorrect. To alle-viate this problem, we have used Excel's Data/Valida-tion menu item. This feature in Excel allows users tocreate dropdown boxes (among other things) contain-ing the possible answers. For example, in the coffeeexample we have students compare linear, quadraticand logarithmic fits to the data and select the modelthey consider to have the best fit. We have used datavalidation to provide them with the 3 choices. Thebottom of Figure 7 shows how the answer cell (B21,for question 2f) appears. The dropdown box is visible,combined with short instructions. When students clickon the dropdown box, the 3 choices appear as in Figure8.

(14) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/final06.xls(15) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/sample_student_final.xls(16) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/grading_file.xls(17) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/sample_student_final.xls(18) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/Final_Part_2.doc(19) Another option, which was suggested to us by a referee, is to alter the macro that creates the data file so that the student's data sets

are pasted into a separate worksheet and stored for later use by the grading macro. We have not tried this option yet, but plan to inthe future.

(20) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/final06.xls

© INFORMS ISSN: 1532-0545141INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

Figure 8: Choices Using Excel's Data Validation Feature

The idea behind the answer sheet is to do some "fool-proofing" so that students put the answers in the rightplace and in the right form so that the grading macrofinds and checks the right responses. As can be seenin Figures 7 and 8, we use a different color for the cellswhere we want students to report their answers. Wealso find it helpful to lock cells that are not to be usedfor student answers (and we protect the sheet so thatstudents do not make other changes that would alterwhere and how answers are reported-see the result ofrunning the file final06.xls(21), where you cannot clickon a cell unless it is one provided for student answers,i.e., it is yellow). It may also be advisable to ask stu-dents to report answers to a specific number of decimalplaces, although we have found that the grading macrocan be written so that it compares the first few decimalplaces of the students' response to those of the correctanswers.

3.2. The Grading File and Macro

The first grading step is for the instructor to createsolutions to the problems. These solutions need to bedynamic rather than static. For example, we ask stu-dents to create a regression model that relates the salesof coffee to the number of dispensers. Our studentsuse Excel's "Data Analysis" tools to find the solution.The results from the tools are static, i.e., do not changewith changes to the data set (the data analysis has tobe "re-run" if any changes to the original data aremade). For the grading file, however, the instructorneeds to use Excel functions that automatically updatewith data changes. For simple regression, for example,the functions SLOPE, INTERCEPT and RSQ can beused. For multiple regression, the array functionLINEST is needed to find most of the regressionstatistics. (See the "Coffee" worksheet of the grad-ing_file.xls(22) file. For example, in cells H2:J6 we usethe LINEST function to estimate the quadratic regres-sion model.)

Our grading file typically has one worksheet for eachmajor problem. These worksheets have a place for thedata and include the functions that find the solutions.The grading file also has a summary sheet (called"Grade Sheet" in grading_file.xls(23) ) that typicallyconsists of 4 columns: one for question labels, one forthe correct solutions, one for the student's solutions,and one that compares the student's solutions to thecorrect solutions using IF functions. For the last col-umn, we also use conditional formatting as a visualcue to the grader to more easily see which questionsthe student answered correctly. We use green font ifthe student response is correct and red font if it needsto be checked further for details.

Once the grading file is created, a grading macro canbe used to check student answers. Our grading macroaccomplishes two tasks. First, it copies the student'sdata to the corresponding worksheets in the gradingfile. Second, it copies the student's answers from heror his Answer Summary sheet into the third columnof the grading file's summary sheet. This macro is quiteeasy to create. First, instructors can useTOOLS/MACRO/RECORD NEW MACRO and thenrecord the key strokes required to copy and paste. Theresulting VBA code, however, will specifically refer-ence the student's file that was used (open) to recordthe macro. To alleviate this problem, we insert thefollowing command into the code as the first line:CurrentFile = ActiveWorkbook.Name. (The code canbe viewed and edited in the Visual Basic Editor, ac-cessed using Alt-F11.) This command causes the stu-dent's file to be called CurrentFile. Then instructorscan do a search and replace to insert CurrentFilewherever the name of the student's file occurs.

Figure 9 shows the results of applying the gradingmacro to the file sample_student_final.xls(24). Note thatwe also added a column called, "Possible" to help withthe grading task. Another thing that we have founduseful is to keep a listing of comments that can bepasted into students' files providing them with feed-back on what they have done incorrectly. We usuallyaccompany those comments with the correspondingpoint deduction to help with making the gradingconsistent across students.

(21) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/final06.xls(22) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/grading_file.xls(23) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/grading_file.xls(24) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/sample_student_final.xls

© INFORMS ISSN: 1532-0545142INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

Figure 9: Sample Grading Sheet

4. A More General Approach to Data SetCreation

The VBA file "Data Generator" that we have describedhas advantages and disadvantages. Most of the advan-tages have been described earlier. There are also someapparent disadvantages. First, the file is most directlyapplicable to statistics, and in particular, regressionproblems. Not all OR/MS instructors need such datasets. While the macro can be used to create data forother applications, using it to do so is not transparent.Second, the time required to create the VBA file wassubstantial and instructors may feel that the develop-ment cost outweighs the potential benefits of such anapplication. In this section, we describe an algorithmthat we believe overcomes both disadvantages.

Some historical background may be helpful in under-standing how simpler, more general purpose macroscan be created. We did not initially set out to createthe Data Generator file. Instead, we tried simpler ap-proaches to create more customized exams. The lessonsthat we learned were incorporated into more sophisti-cated applications until we decided to try to create anapplication from which many instructors might benefit(i.e., Data Generator). In most cases, the lessons thatwe learned had to do with making the files fool proofso that students did not modify the files in a way thatwould make it difficult to grade.

For OR/MS instructors who don't feel that Data Gen-erator meets their needs, some of the "methods" that

we used early on may prove useful. These methodsshould help mitigate both disadvantages above:namely, they can be used for almost any kind ofproblem that requires input data and they do not re-quire extraordinary amounts of time. We have createda relatively simple algorithm that synthesizes the stepswe have used to create customized data sheets. Thesteps of the algorithm follow.

1. For a specific problem, create a worksheet that hasthe data in a desired format or structure. For exam-ple, suppose that the instructor wants to havestudents solve a transportation problem. He or shewould decide how the supply and demand values,as well as the cost matrix, should be presented tostudents and possibly type some sample numbersinto the spreadsheet in the designated areas.

2. Determine what distribution the input data willfollow. For the transportation problem example,the instructor may want to have demands that arenormally distributed, supplies that follow a dis-crete distribution, and costs that are uniformlydistributed. This step also requires that parametersof the distribution be specified. We typically entersuch parameters on the spreadsheet in a locationthat is somewhat far from the location of the datathe students will see.

3. Replace the hard coded data entered in step 1 withfunctions that will simulate the desired distributionfunctions. For example, the functionNORMINV(RAND(),μ,σ) will simulate a normaldistribution. If whole numbers are desired, theROUND function can be used (so for normal de-m a n d s t h e f u n c t i o n wo u l d b eROUND(NORMINV(RAND(),μ,σ),0)). In somecases we have created problems where the param-eters themselves are also random variables withina small range. Any time a value needs to varyrandomly, the RAND function can be used in Excelto accomplish the task. Many OR/MS textbookshave simulation chapters that describe how theRAND function can be combined with otherfunctions to create the desired simulated distribu-tions (see Albright and Winston 2005, for example).

4. Hide the worksheet (using Format/Sheet/Hide)that was just created and save the file. This step isin preparation for what will be presented to thestudents when they open the file.

© INFORMS ISSN: 1532-0545143INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

5. Repeat steps 1 - 4 for each subsequent test problemthat requires a customized data sheet. At this point,we also create the Answer Summary Sheet de-scribed in section 3.2 and hide it. If desired, protectthe workbook using Tools/Protection/ProtectWorkbook so that students will not be able to re-veal the hidden worksheets.

6. Use Excel's TOOLS/MACRO/RECORD NEWMACRO command to create the VBA code "en-gine" of the macro. With the recorder on, unhidethe worksheet(s), press the F9 key to recalculatethe values, copy the cells with the embeddedRAND functions, and use EDIT/PASTE SPE-CIAL/VALUES to "freeze" the data (i.e., to removethe formulas and paste only their values). Next,erase any auxiliary cells (e.g., those containing theparameters for the distributions) that the studentsdon't need to see. The worksheet should now onlyhave the data as the instructor wants them present-ed to the student. With the recorder still on, followthe above steps for every worksheet that is hidden.Once all sheets are revealed and the data arefrozen, stop the macro recorder.

7. Open the VBA editor (TOOLS/MACRO/VISUALBASIC EDITOR or Alt-F11) and add to the codethat was recorded in previous steps in the follow-ing ways, if desired.

1. If the workbook was protected in step 5 above,the following code can be used to unprotect itautomatically: ACTIVEWORKBOOK.UNPRO-TECT ("PASSWORD"), where PASSWORDis the password that was selected in step 5above.

2. Our preference is for the macro to run automat-ically when the students open the file. The codeprovided in Appendix 2 causes Excel to promptthe student for his or her student id and thencopies all of the desired worksheets into a newfile named after the student's id. These lines ofcode should be copied into the "ThisWorkbook"object within the Microsoft Visual Basic Project.There are three specific names that we use inthe code that other users may want to change.First, we assume that the macro that wasrecorded in step 6 above is called "Macro1."Second, we assume that the answer summarysheet is called "Answer Summary." Third, weassume that the only unhidden sheet of the filecontaining the macro is called "Intro."

3. As mentioned in the footnote from section 3.1,the instructor may want to store the student'sdata for use later by the grading macro. Forexample, a new worksheet could be createdwhere all of the student's data would be past-ed. Then that worksheet could be hidden tothe student. Doing so would alleviate the needto instruct students explicitly not to move orotherwise alter their data. In other words, thisstep would be a safeguard if the student altershis or her data in some way, so that the gradingmacro will use the "true" data used by the stu-dent. As this suggestion came to us from areferee, we have not implemented it at thispoint but plan to do so in the future.

4. We prefer that the students not see the codethat we use to create the data set. Therefore weprotect the macro file. To do so, useTOOLS/VBA PROJECT PROPERTIES, selectthe PROTECTION tab, lock the project forviewing and then select a password.

At this point the instructor should have a file that canbe distributed to students. The procedure does notrequire advanced knowledge of VBA programmingand should be generally applicable to any type ofproblem that OR/MS instructors may want to create.

5. Conclusions

We have suggested the use of individualized data setsfor each student in classes requiring data analysis.Such exams allow instructors to provide students withinteresting and challenging questions while reducingthe chances of undesirable student collaboration. Wehave provided instructions for a macro that can beused to create such data sets for correlation and regres-sion questions and have discussed a grading procedurefor such assignments. We have also described an ap-proach that allows instructors to create more general,yet customized, data sets.

Our experience with customized exams and assign-ments is that they allow a greater learning opportunityfor students because they compel students to do theirown work rather than relying on work done by otherstudents. Students are able to hone their analysis skillsby practicing the methods on different data sets. Byusing full data sets rather than just a few numbers,

© INFORMS ISSN: 1532-0545144INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

instructors also have the opportunity to discuss as-sumptions and interpretation of the analyses.

We recognize that these data sets are not able to teststudents' ability to understand all of the underlyingconcepts that we attempt to teach in our courses.Hence we also ask conceptual questions about inter-pretation and assumptions. We honestly hope that nomachine is ever able to duplicate completely the highlevel questions and responses that complex dataanalysis requires. Hopefully students will always beable to rely on engaging and creative instructors whohelp them to attack the most interesting and messyproblems.

ReferencesAlbright, C. and W. Winston. 2005. Spreadsheet Model-

ing and Applications: Essentials of Practical Man-agement Science, Duxbury Press, Australia.

Hambleton, K. H., H. Swaminathan and H.J. Rogers.1991. Fundamentals of Item Response Theory, SagePublications, Newbury Park, pp. 145-152.

Larreamendy-Joerns, J., G. Leinhardt and J. Corredor.2005. "Six Online Statistics Courses: Examina-tion and Review," The American Statistician, Vol.59, pp. 240-251.

Neter, J., W. Wasserman, and M. H. Kutner. 1985. Ap-plied Linear Statistical Models: Regression, Analy-sis of Variance and Experimental Design, RichardD. Irwin, Inc., Homewood, IL, pp. 305-313.

Strickland, D. 2006. "Cheaters Never Win, But Some-times They Make Better Grades," OR/MS Today,Vol. 33, pp. 14-15.

Wainer, H. 2000. Computer Adaptive Testing: A Primer,2nd Edition, Lawrence Erlbaum Associates,Publishers, Mahwah, New Jersey.

© INFORMS ISSN: 1532-0545145INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

Appendix

Appendix I - Included Supplemental Files

We have included 4 supplemental files with our submission. The files are Final_Part_2.doc(25), final06.xls(26),sample_student_final.xls(27) , and grading_file.xls(28) . Each is described briefly below.

Final_Part_2.doc

This is the Word file that contains the questions that we asked the students. It also includes instructions to thestudents. Note that it is Part 2 of a two-part exam. The first part of the exam contained more conceptual questionsand did not require Excel.

final06.xls

This is the file that generates the data sets as explained in section 4. When opened the macro will begin auto-matically, prompt the student for his or her id, and then create the data file using the supplied id to name thefile. Typically we would hide and protect the code, but for the purposes of the paper we have not done so.

In order to see the VBA code associated with the file, it is necessary to disable the macro when opening it (becausethe macro starts automatically and closes the final06.xls file as soon as it is done running). Also, we have pro-tected the workbook so that students cannot change its structure. The file can be unprotected using Tools/Pro-tection/Unprotect Workbook and entering password when prompted for a password. Once unprotected, it ispossible to unhide the hidden worksheets and see the functions that we used to simulate the data.

sample_student_final.xls

This is a file that a student submitted for the exam. It can be used to experiment with the grading macro. Boththis file and "grading_file.xls" should be open, but this file should be the active file before running the gradingmacro.

grading_file.xls

This file contains the grading macro that we created using the methods described in section 3.2. It is used tocheck student answers automatically. With this file and the "sample_student_final.xls" file open, and the latteractive, use CTRL-SHIFT-g to invoke the macro.

Appendix II - Code to Automatically Run the Recorded Macro Upon Opening the File

Option Explicit

Private Sub Workbook_Open()

Dim NewFile, CurrentFile As String

(25) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/Final_Part_2.doc(26) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/final06.xls(27) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/sample_student_final.xls(28) http://ite.pubs.informs.org/Vol7No1/TsaiWardell2/grading_file.xls

© INFORMS ISSN: 1532-0545146INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

Dim WSheet As Worksheet

Dim WSName As String

Dim i, j, n As Long

' Store the name of the workbook containing the macro as CurrentFile.

' Then call the macro that unhides the worksheets and freezes the randomly

' generated values.

CurrentFile = ActiveWorkbook.Name

Call Macro1

' Prompt the student for his or her student id and then name a new file

' using that id.

NewFile = Application.InputBox(Prompt:="Please type in your student ID: ", _ Type:=2)

NewFile = NewFile & ".xls"

Workbooks.Add

ActiveWorkbook.SaveAs Filename:=NewFile

' Count the number of default worksheets in the newly created file (to be used

' later)

n = Workbooks(NewFile).Worksheets.Count

' Copy all of the worksheets that contain student data from the CurrentFile into

' the NewFile. The only worksheets that are not copied at this point are the

' intro and Answer Summary sheets.

Windows(CurrentFile).Activate

i =-1

For Each WSheet In ActiveWorkbook.Worksheets

If WSheet.Name <> "Intro" And WSheet.Name <> "Answer Summary" Then

WSName = WSheet.Name

Worksheets(WSName).Copy before:=Workbooks(NewFile).Sheets(i)© INFORMS ISSN: 1532-0545147INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic

End If

i = i + 1

Windows(CurrentFile).Activate

Next

' Now copy the Answer Summary worksheet into the new file.

For Each WSheet In ActiveWorkbook.Worksheets

If WSheet.Name = "Answer Summary" Then

WSName = WSheet.Name

Worksheets(WSName).Copy before:=Workbooks(NewFile).Sheets(1)

End If

Next

' Delete all worksheets from the new file that don't contain data.

For j = 1 To n

Workbooks(NewFile).Worksheets(i + j).Visible = False

Nextj

' Close the file that generates the data (the CurrentFile)

Windows(CurrentFile).Activate

ActiveWindow.Close SaveChanges:=False

EndSub

© INFORMS ISSN: 1532-0545148INFORMS Transactions on Education 7:1(136-148)

TSAI & WARDELLCreating Individualized Data Sets for Student Exercises Using Microsoft Excel and Visual Basic