100% found this document useful (2 votes)
2K views10 pages

Pelican Stores Case Study Solutions

Pelican Stores Case Study solutions from the book . All the questions have solutions done in Rstudio

Uploaded by

deepak joshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
2K views10 pages

Pelican Stores Case Study Solutions

Pelican Stores Case Study solutions from the book . All the questions have solutions done in Rstudio

Uploaded by

deepak joshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Pelican Stores case study

Answer 1.Percent frequency distribution is same as frequency distribution as the


number of items is 100
Items Purchased Frequency
1
1
29
2
2
27
3
3
10
4
4
10
5
5
9
6
6
7
7
7
1
8
8
1
9
9
3
10
10
1
11
13
1
12
17
1

Methods of Payment Percentage Frequency


1 American Express
2
2
Discover
4
3
MasterCard
14
4 Proprietary Card
70
5
Visa
10

Gender Percentage Frequency


1 Female
93
2 Male
7

Customer Type Percentage Frequency


1 Promotional
70
2
Regular
30

1
2

Marital Status Percentage Frequency


Married
84
Single
16

Age Range Percentage Frequency


1 (20,30]
16

2
3
4
5
6

(30,40]
(40,50]
(50,60]
(60,70]
(70,80]

26
32
15
6
3

Net Sales ($) Percentage Frequency


1
(0,25]
10
2
(25,50]
29
3
(50,75]
26
4
(75,100]
9
5
(100,125]
12
6
(125,150]
4
7
(150,175]
3
8
(175,200]
3
9
(200,225]
0
10
(225,250]
1
11
(250,275]
2
12
(275,300]
1

Answer 2

Answer 3 Most of the buyers are in the range from $25 to $75 for both promotional
and regular customers.
sales.cut
CustomerType (0,25] (25,50] (50,75] (75,100] (100,125] (125,150] (150,175] (175,200]
(200,225]
Promotional
7
17
17
8
9
3
2
3
0
Regular
3
12
9
1
3
1
1
0
0
sales.cut
CustomerType (225,250] (250,275] (275,300]
Promotional
1
2
1
Regular
0
0
0

Answer 4

The code in R for all the solutions


mydata=PelicanStores
mydata
attach(mydata)
mydata=data.frame(CustomerType, Items, NetSales,
PaymentMethod,Gender,MaritalStatus,Age)
mydata
summary(mydata)

//Solution1
Items.freq=data.frame(table(Items))
names(Items.freq)=c("Items Purchased", "Frequency")
Items.freq
mop.freq=data.frame(table(PaymentMethod))
names(mop.freq)=c("Methods of Payment","Percentage Frequency")

mop.freq
gender.freq=data.frame(table(Gender))
names(gender.freq)=c("Gender" , "Percentage Frequency")
gender.freq
ct.freq=data.frame(table(CustomerType))
names(ct.freq)=c("Customer Type","Percentage Frequency")
ct.freq
marital.freq=data.frame(table(MaritalStatus))
names(marital.freq)=c("Marital Status","Percentage Frequency")
marital.freq
range(Age)
range(NetSales)
break1=seq(20,80,by=10)
break1
age.freq=data.frame(table(cut(Age,break1)))
names(age.freq)=c("Age Range","Percentage Frequency")
age.freq
break2=seq(0,300, by=25)
sale.freq=data.frame(table(cut(NetSales,break2)))
names(sale.freq)=c("Net Sales ($)","Percentage Frequency")
sale.freq

//Solution2
mop.barplot=ggplot(mydata, aes(x=PaymentMethod, y=Items))
mop.barplot+geom_bar(stat="identity")+labs(x="Method of Payment", y="Item
Count")

//solution3
sales.cut=cut(NetSales,break2)
crosstab1=table(CustomerType,sales.cut)

crosstab1

//solution4
plot(Age, NetSales, main="Age Vs Netsales", xlab="Age of Buyer", ylab="Sales in
Dollars", pch=20, ylim=c(0,250))

You might also like