Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There 3 DataFrames: ( customer id age 0 1 1 4 9 7 1 . 0 1 7 5 0 2 1 . 0 2

There
3
DataFrames:
( customer id age
0114971.0
175021.0
242836.0
336038.0
481651.0
........
862119353.0
863115562.0
8642123.0
86546828.0
86656222.0
[867 rows x 2 columns],
customer_id date shop_id total_price
00.02018-05-0440289.673291
10.02019-01-26401316.898901
20.02018-11-1842159.414367
30.02018-05-1242808.791649
40.02019-04-20421207.855038
...............
40397 NaN 2018-05-0537169.086474
40398 NaN 2018-09-297310.993395
40399 NaN 2018-10-31117.535630
40400 NaN 2019-02-1637218.576020
40401 NaN 2018-12-1549557.510380
[40402 rows x 4 columns],
shop_id offer_begin offer_end
002019-02-282019-03-13
102018-07-222018-08-10
202018-09-212018-09-27
31 NaN NaN
42 NaN NaN
...........
178722018-05-072018-05-26
179732019-05-082019-06-11
180742018-09-142018-10-12
181742018-12-082019-01-10
182742018-08-222018-08-28
[183 rows x 3 columns])
Do people tend to spend more money when they make a purchase during a special offer? Let's check it!
First of all, we know that during December people spend more money in shops due to holidays and at the time shops usually announce more special offers during December. As we are interested in the effect of special offers alone, let us remove all purchases that happened during December.
Then create a table which rows are customers that contains two columns: in one column we have average of all prices of purchases that were made during special offers, and in the second the same for purchases that were not made during special offers. Drop all rows that contain NaN's. Then apply an appropriate statistical test to check if there is any statistically significant difference between these columns. Use two-sided alternative.

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

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions