QuotaSamplingPopulation100000Quota5%Number of people to be surveyed in each categoryMale 55%Female 45%Social classABCABCAge30%50%20%30%50%20%TOTAL16-2925%30 - 4430%45 - 6430%65 and over15%TOTAL
RandSampleIllustration of simple random samplingSummary statisticsMeanStdevPopulationSamplePopulationFamilyIncomeRandom#FamilyIncome Random#1$25,4712$26,0593$20,3534$22,3535$26,2946$26,8247$25,1188$21,7069$22,58810$19,82411$25,94112$30,29413$21,11814$20,94115$25,29416$22,70617$19,05918$13,47119$28,29420$18,76521$33,17622$19,76523$22,41224$25,00025$26,41226$20,70627$35,76528$25,00029$28,00030$21,23531$19,41232$18,64733$28,58834$23,11835$19,41236$21,35337$16,70638$27,58839$21,94140$24,118
Illustration of Random Sampling
StratifiedSamplingStratified sampling by TesBuryTotal sample size100Strata based on ageStratum 118to30Stratum 231to62Stratum 363to80CustAgeCategoryCust_1Age_1Cust_2Age_2Cust_3Age_314923935546655263773483493310361123126313241447153016591731183419352029214722312354244125382630274428372932304131483236333634263556363637533875393540644134427143254445453646354731484349415062513652555363545755255628573958565958602161336228634964716537665267276866695270377143724373427446753676317736786279308029814082438345843985618631872388528938904091579238934194529564963697459837992610046101221027610344104321054310634107361085810937110441114011255113521143111546116251176311858119251203812149122271235812422125421263812767128711294713074131281323413325134491355813659137571386313937140421414714233143411444014553146451474714841149671503415128152551534015442155611564015743158551595216038161481623016330164491655716626167471687216946170251713917262173391744717542176591774317869179481805918170182621832918440185521866118763188271894419040191191922419349194551953119636197291985219948200482014720251203392044420550206782074320843209572104721150212432137421444215302162821754218442196522053221452225422370224482254822638227392286422927230362316023234233582343623548236612374823846239422405824155242332436324428245332463024738248512495225029251312523725356254402557525636257652582425939260452613826271263622646226560266692674926844269502703427155272422735627461275652765427734278562793928027281202825528332284752855728627287352886828967290512914029269293392944829564296442976229847299413006730152302493034430463305593063530751308313093531033311403124231355314323153331639317463184231926320383215232229323423243832531326553276832869329653302333153332463335333436335453364533761338673397434058341363424734341344313455734659347343485634962350313513735254353213545435543356233574135840359713604736168362503635436434365543667236760368333693137046371223724237337374353754237657377283784137933380393816038254383373843838574386383874238848389403902439133392333933239435395533966139720398463995940058401304023340334404284054640661407524084040927410294114341226413314144041537416224173541854419554203642141422514233442447425334265042723428444292443034431304324243331434464353543642437474384443954440274413 ...
How to Send Pro Forma Invoice to Your Customers in Odoo 17
QuotaSamplingPopulation100000Quota5Number of people to be surveye.docx
1. QuotaSamplingPopulation100000Quota5%Number of people to
be surveyed in each categoryMale 55%Female 45%Social
classABCABCAge30%50%20%30%50%20%TOTAL16-
2925%30 - 4430%45 - 6430%65 and over15%TOTAL
RandSampleIllustration of simple random samplingSummary
statisticsMeanStdevPopulationSamplePopulationFamilyIncomeR
andom#FamilyIncome
Random#1$25,4712$26,0593$20,3534$22,3535$26,2946$26,824
7$25,1188$21,7069$22,58810$19,82411$25,94112$30,29413$2
1,11814$20,94115$25,29416$22,70617$19,05918$13,47119$28,
29420$18,76521$33,17622$19,76523$22,41224$25,00025$26,4
1226$20,70627$35,76528$25,00029$28,00030$21,23531$19,41
232$18,64733$28,58834$23,11835$19,41236$21,35337$16,706
38$27,58839$21,94140$24,118
Illustration of Random Sampling
StratifiedSamplingStratified sampling by TesBuryTotal sample
size100Strata based on ageStratum 118to30Stratum
231to62Stratum
363to80CustAgeCategoryCust_1Age_1Cust_2Age_2Cust_3Age_
31492393554665526377348349331036112312631324144715301
65917311834193520292147223123542441253826302744283729
32304131483236333634263556363637533875393540644134427
14325444545364635473148434941506251365255536354575525
56285739585659586021613362286349647165376652672768666
95270377143724373427446753676317736786279308029814082
43834584398561863187238852893890409157923893419452956
49636974598379926100461012210276103441043210543106341
07361085810937110441114011255113521143111546116251176
31185811925120381214912227123581242212542126381276712
87112947130741312813234133251344913558136591375713863
13937140421414714233143411444014553146451474714841149
67150341512815255153401544215561156401574315855159521
60381614816230163301644916557166261674716872169461702
5. Total number of residents: 100000
Gender as % of population:
55% Male, 45% Female
Age groups as % of population:
16-29 (25%); 30-44 (30%); 45-64 (30%); 65+ (15%)
Social Class as % of population:
A (30%); B (50%); C (20%)
Devise a quota sampling for this example using Excel. Do the
following:
(i) Download the Excel file entitled “SamplingWithExcel” from
Blackboard to
your user space (or to a USB).
(ii) Start Excel and open the worksheet “QuotaSampling”.
(iii) Use relative or absolute references to the cells (where
necessary) to
enter appropriate formulae to calculate the number of people to
be
surveyed in each category.
6. MS1023 Business Statistics with Computer Applications I
Sampling with Excel
Dr Maho Sonmez /[email protected]/ 2
2) Illustration of Simple Random Sampling using Excel
This example is adapted from Albright, Winston and Zappe
(p.380).
Consider the frame of 40 families (as Population) with annual
incomes shown in
the worksheet “RandSample” in the file “SamplingWithExcel”.
We want to choose
a simple random sample of size 10 from this frame. How can
this be done? And
how do summary statistics of the chosen families compare to the
corresponding
summary statistics of the population? Our objective is to
illustrate how Excel’s
random number function, RAND(), can be used to generate
simple random
samples.
7. (i) Start Excel and open the file “SamplingWithExcel”. Select
“RandSample”
worksheet.
(ii) Select cell B5 and enter the formula =AVERAGE(B10:B49)
(iii) Select cell C5 and enter the formula =STDEVP(B10:B49)
(iv) Select cell C10 and enter the formula =RAND()
(v) Copy the formula in cell C10 down to cells C11 to C49.
WARNING: Excel’s
RAND() function is sensitive in the sense that whenever you do
something
else on the worksheet such as copy a formula or enter a formula,
Excel
generates new set of random numbers. So if this happens, don’t
panic!
(vi) Now, you should be able to see generated random numbers.
Now, to
enable sorting we must “freeze” the random numbers (see
warning in (v)).
In other words, we must replace the formulas with their values.
To do this,
select and copy the range C10:C49, and then select C10, right
click and
select Paste Special. Then, check the Values option and click
OK.
(vii) Now, copy the range A10:C49 to the range E10:G49.
8. (viii) To select a random sample of 10 families, you may do the
following. Select
G10 and click the Sort button, i.e. . Then, the 10 smallest
random
numbers are the ones in the sample.
(ix) Type in the formulas =AVERAGE(F10:F19) to cell B6 and
=STDEV(F10:F19) to C6. Observe and compare the population
statistics
with the sample statistics.
(x) For info only. To obtain more random samples of size 10
(for comparison),
we need to go through the above process repeatedly.
MS1023 Business Statistics with Computer Applications I
Sampling with Excel
Dr Maho Sonmez /[email protected]/ 3
3) Stratified Sampling using Excel
This example is adapted from Albright, Winston & Zappe (p
387).
9. The worksheet “StratifiedSampling” contains a frame of all
1000 people in the city
of Loveboro who has TesBury credit cards. TesBury is
interested in estimating
the average number of credit cards these people own, as well as
other
information about their use of credit. The company decides to
stratify these
customers by age, select a stratified sample of size 100 with
proportional sample
sizes, and then contact these 100 people by phone. How might
TesBury
proceed? Our objective is to illustrate how stratified sampling,
with proportional
sample sizes, can be implemented in Excel.
REASONING & ASSUMPTIONS:
TesBury has to decide exactly how to stratify by age. Their
reasoning is that
different age groups have different attitudes and behaviour
regarding credit. After
some preliminary investigation and discussions, they decide to
use three age
10. categories: 18-30, 31-62, and 63-80. It was assumed that no one
in the population
is younger than 18 or older than 80.
(i) You need to work on the worksheet “StratifiedSampling” in
the Excel file
“SamplingWithExcel”.
(ii) Start Excel and open the file “SamplingWithExcel”. Select
“StratifiedSampling” worksheet.
(iii) As you can see from the worksheet, we have a list of 1000
customers
(numbered in ascending order) and the ages of these customers.
We also
know that there are three strata based on age. Our first task is to
find out
which age stratum each customer is in. To do this, we will
assign number 1
if the customer is aged between 18 and 30; number 2 those
customers aged
between 31-62 and 3 for those between 63 and 80. We could do
this
manually but you can imagine how tedious and time consuming
this can be
11. for 1000 entries. We can do this with one formula. How? Follow
the
instructions below.
(iv) Select cell C11. We must use the IF Logical function here.
The logic is as
follows, if it is true that cell B11 is less than or equal to 30,
than number 1
should appear in C11; if it is true that cell B11 is less than or
equal to 62,
than number 2 should appear in C11; otherwise number 3 should
appear in
MS1023 Business Statistics with Computer Applications I
Sampling with Excel
Dr Maho Sonmez /[email protected]/ 4
cell C11. Enter the formula =IF(B11<=D6,1,IF(B11<=D7,2,3))
in cell C11
and then copy it down column C. Did you notice that the results
are not as
expected? Why? Hint: RELATIVE or ABSOLUTE references.
(v) By now, you should have entered the correct formula and
each customer is
12. assigned a category number. Now, we need to “unstack” the
data into three
groups, one for each category as can be seen from columns F
through M.
For example, columns F and G will list the customer numbers
and ages for
all customers in the first age category (i.e. 18-30). To do this,
select C11
and click on (A-Z ascending) sort button. Then, copy the range
of customers
and their ages who are in the first age category and select F11
and paste.
Repeat the same for categories 2 and 3.
(vi) Type Counts in Cell F5 and SampSize in Cell G5. Select F6
and enter the
formula =Count(F11:?) where ? is the last cell (or customer) in
the first age
category. Repeat this to get the number of customers in the age
categories
2 and 3 in cells F7 and F8.
(vii) We need to find out how many customers should be
selected from each
13. category to make up the total sample size of 100. TesBury
decided to use
a proportional sample size. So select G6 and enter the formula
=ROUND($C$3*F6/1000,0) to calculate the number of
customers to be
selected in the first age category. Copy the formula in Cell F6
to get the
number of customers for age categories 2 and 3. Hence,
TesBury should
sample 13, 77, and 10 customers from three age categories.
(viii) Now, the next question is how to select 13, 77, and 10
customers from three
age categories. The answer is simple, use the simple random
sampling
process explained earlier.
(ix) Type Random# to cells H10, K10 and N10. Now, select H11
and enter
formula =Rand() and copy it down. “Freeze” these random
numbers with the
Copy and Paste Special/Values commands. Then, copy the
whole category
1 (i.e. select F10:H10 to down). Paste them to cell P10. Select
14. any cell under
Random# and click on sort button (ascending A-Z). Then, select
the top 13
customers.
(x) Repeat above process to select customers for the age
categories 2 and 3.