Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use R or R studio to solve the following: Suppose we have the two customer groups profiles as below. What is the average offline

Please use R or R studio to solve the following:

Suppose we have the two customer groups profiles as below. What is the average offline spending for the customer group A who match all of the following conditions? What is the average offline spending for the customer group B who match all of the following conditions? Which group of customers spend more in the offline store on average? Suppose the dataset is called sales. How would you code the following to get results?

Customer group As profile

  1. Age >= 20
  2. Living in Normal
  3. Female
  4. Customers who posted reviews
  5. Customers who live more than 10 miles (> 10) away from the store
  6. Customers who never returned products through offline store

Customer group Bs profile

  1. Age < 35
  2. Income < 85000
  3. Loyalty level = low
  4. Living in Bloomington
  5. Customers who live within 40 miles (<= 40) from the store
  6. Customers who never visited online store
  7. Customers who purchased products through offline store at least once
age email city sex distance.to.store online.visits online.trans online.spending online.return offline.trans offline.spending offline.return review income loyalty
12 yes bloomington female 0.91 353 117 832.58 0 2 26.51 0 yes 70538.3 high
23 yes normal female 15.35 0 0 0 0 0 0 0 no 72254.83 low
37 yes bloomington female 47.48 0 0 0 0 0 0 0 no 74205.44 high
22 yes bloomington female 2.28 40 8 68.32 0 2 50.48 2.67 yes 72210.13 med
38 yes bloomington female 19.23 80 32 236.48 0 1 15.88 0 yes 73914.73 high
34 yes bloomington female 1.22 6 0 0 0 5 57.92 0 no 73819.08 low
16 yes bloomington female 2.85 0 0 0 0 1 12.22 0 no 72262.31 med
23 yes normal female 2.97 7 4 29.97 0 0 0 0 no 72180.03 med
31 yes normal female 60.51 19 4 27.9 0 1 11.87 0 yes 73813.56 high
33 no normal female 72.98 2 1 9.13 1.46 0 0 0 no 73500.6 low
25 yes bloomington female 14.76 9 2 14.49 0 2 19.67 0 no 72654.17 med

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Influxdb Database A Comprehensive Guide To Learn Influxdb Database

Authors: Cybellium Ltd ,Kris Hermans

1st Edition

B0CNGGWL7B, 979-8867766450

More Books

Students also viewed these Databases questions

Question

What markup percentage does the firm use?

Answered: 1 week ago

Question

Question in Chemical Engineering Please give Correct Answer 4 .

Answered: 1 week ago