HW8 SP23 2nd

xlsx

School

Carnegie Mellon University *

*We aren’t endorsed by this school

Course

123

Subject

Computer Science

Date

Feb 20, 2024

Type

xlsx

Pages

12

Uploaded by SuperHumanNightingalePerson177

Report
Text If you could get access to all members of your population, but don't have the time or money to do so, consider using a random number generator to select a random sample. Look at Problem 1 on the Lesson tab. ABC Accounting Firm wants to take a random sample of its 30 clients to select 5 to interview in depth about ways to improve its service to customers. Use Excel to do this. Using A Random Number Generator We want to pick five clients from a list of 30 clients to interview in depth. How do we pick the sample? Type Clients in Col A, and Sample in Col B. Assign a number code to each element of the population. Type the numbers 1 through 30 in A2-A31. We could just type the names in, but why do all that work? We know that Spangles is number 1 and McDonalds is number 2, etc. You can easily do this by typing 1 in A2, then =A2 +1 in A3 and dragging it. Type =RAND() in B2, and drag it down. Select Col A and Col B. Right click and select Copy. Be sure your cursor is on the first number and select Paste Special. Select value. This has the effect of replacing the formulas in Col A and B with the number values. Select A1-B31. Click on the Data tab. Click on Sort. Sort by Sample. Excel sorts the data in ascending order in Col B and carries that order to Col A, which gives a random permutation of Col A. If we want a sample of 5, we take the first 5. If we want a sample of 10, we take the first 10. If you do the homework this way, you should say you used RAND() with Data Sort Suppose that we need to do some marketing research for our firm. We want to survey people in Wichita about cell phone use. First we need to get the population frame. Think about what you want to find out. Do we really want everybody in Wichita? Babies & kids? If we just pick numbers at random out of the phone book, who do we leave out? Unlisted numbers, new numbers, people with cell phones, etc. So we need a way to get everybody. Should
we generate random 7-digit phone numbers? No, we could get people in Timbuktu. If we knew the exchanges for Wichita, we could randomly select the last four digits. Who knows that? Try the phone companies: Southwestern Bell, Horizon Wireless, etc., or the Kansas Corporation Commission to get the first three numbers. How can I get this information? Call them and ask them for a list. Suppose we’ve been assigned the exchange 209. Now let’s generate the last 4 numbers. Pick a cell. Type =INT(10*RAND()). Now drag it across as many columns and rows as you want. You now have a table of random integers. You could then just pick by fours. If you do the homework this way, you should say you used INT(10*RAND()) What if you want the numbers grouped by fours? =INT(10000*RAND()) Note: You have to realize that if Excel gives you 2, it means 0002 You will most likely have to format the cells to "Text" to get the first three zeroes to show. If you do the homework this way, you should say you used INT(10000*RAND()) Using Randbetween You can use the Randbetween function in the same way you used INT(10*RAND()). It gives you an integer between whatever values you select. For example: RANDBETWEEN(0,9) for telephone numbers You should say you used RANDBETWEEN(whatever numbers you used)
Practice Problems Kobe Steakhouse Scotch & Sirloin Angelo's Chelsea's Sweet Basil Italian Garden Two Fat Chefs Chinatown Golden China Papa John's Olive Garden La Chinita Anchor Inn Restaurant Taco Bell DeFazios Cibola The Scottish Crown Pub China Buffet Marco's Cantina Green Mill SAMPLE ANSWERS Since everyone will have RANDOMLY ASSIGNED numbers, no two should be alike. You WILL NOT GET THESE EXACT ANSWERS. However, the format will LOOK the same. =RAND() 11 0.00132503 (a) Choose #11 Angelo's 1 0.04501477 #1 Kobe Steakhouse 2 0.153794 #2 Sweet Basil 12 0.22447315 #12 Two Fat Chefs 20 0.27673696 #20 Green Mill 5 0.33872289 8 0.35427095 (b) RAND() and Data Sort 18 0.47156928 19 0.49323546 9 0.50631348 7 0.54262732 3 0.62219935 10 0.71599532 13 0.76211535 6 0.80881084 4 0.83119106 16 0.89499186 15 0.91026206 17 0.92640874 14 0.946207 1. (a) Use Excel to select a random sample of 5 restaurants from the following list. (1 pt) (b) Tell which method you used. (1 pt)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
2. The Wichita Eagle wants to do a telephone survey regarding the increase in postal rates which goes into effect July 1. 3 6 5 6 0 1 1 0 2 5 8 1 One way: =INT(10*RAND()) You could use =RANDBETWEEN(0,9) 12 times 3 3 3 6 2 0 9 3 4 4 5 8 (a) Use Excel to generate three four-digit telephone numbers. (1 pt) (b) Tell what method you used. (1 pt)
SCORE: 5 H NAME: Adhanet Hagos Comments Points off 1. You can use Excel in lieu of random dig North American Numbering Plan (NANP Do not use these columns! consisting of a three-digit Numbering P an area code, followed by a three-digit 2 through 9 and X is any digit from 0 th a. that the North American Numbering P or 1 for the first number of the area co 1 4 0 1 2 2 3 3 3 5 0 9 4 8 7 5 5 3 2 8 6 6 3 7 b. Indicate which sampling method you u example, if you use RandBetween, fill RandBetween(2, 9) for the first an RandBetween(0, 9) for the rest of 2. The following companies are used to c 3M Exxon Mobil American Express General Elect Apple Goldman Sac Boeing Home Depot Caterpillar IBM Chevron Intel Cisco Johnson & Joh Coca-Cola JPMorgan Cha Disney McDonald's The format is usuallyrepresented as N Obtain 6 random ten-digit telephone n RandBetween(low, high), Sampling Too
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
duPont Merck Population =rand() Visa 29 0.96394954 Intel 16 0.95477844 Goldman Sac 13 0.95084638 Home Depot 14 0.90234618 Proctor and 24 0.88999798 Nike 22 0.87119727 McDonald's 19 0.79793376 Verizon 28 0.75135359 Chevron 6 0.73590254 Merck 20 0.71562802 Travelers Com 25 0.68038005 Exxon Mobil 11 0.67492071 JPMorgan Ch 18 0.65989782 Apple 3 0.63667897 Cisco 7 0.58782237 United Techn 26 0.55951051 3M 1 0.52201346 duPont 10 0.45267721 American Exp 2 0.42197326 Caterpillar 5 0.37074725 Wal-Mart 30 0.35246282 Pfizer 23 0.28456424 Microsoft 21 0.28311453 Johnson & Jo 17 0.27452492 Disney 9 0.22416445 UnitedHealth 27 0.14294385 Coca-Cola 8 0.13531349 General Elect 12 0.09690764 Boeing 4 0.06877785 IBM 15 0.01950149 a. Use Excel to choose a random sample must indicate the names of the 5 comp b. Indicate which sampling method you u how you got your sample. NO CREDIT RandBetween(low, high), Sampling Too
example, if you use RandBetween, fill Rand() with Data Sort
Homework 8 2nd 8 weeks (5 pts.) git dialing equipment. The U.S. follows the P). NANP numbers are ten-digit numbers Plan Area (NANP) code, commonly called t exchange and a four-digit local number. hrough 9. Plan does not permit use of the numbers 0 ode OR the first number of the exchange. 7 7 1 1 3 0 6 7 1 0 7 9 3 5 6 2 0 7 6 6 9 0 5 0 4 9 2 3 2 2 8 3 9 4 5 0 used: Rand() with Data Sort, in the numbers for the low and high! nd fourth digit of the number - 12 times the phone number digits - 48 times calculate the Dow Jones Industrial Average. Microsoft tric Nike chs Pfizer Proctor and Gamble Travelers Companies, Inc. United Technologies hnson UnitedHealth ase Verizon Visa NXX-NXX-XXXX , where N is any digit from numbers. (2 pts.) . Please note ol, etc. (1 pt.) Be VERY specific! For
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Wal-Mart sample Visa 29 Intel 16 Goldman Sachs 13 Home Depot 14 Proctor and Gamb 24 of 5 companies from this list. You panies for the sample you picked and show used: Rand() with Data Sort, T if you do not show your work! (1 pts.) ol, etc. (1 pt.) Be VERY specific! For
in the numbers for the low and high!
4 7 0 2 9 7
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help