Problem 2267. Sales Prediction

Miss X is a shopaholic person and every weekend she goes to a mall. There are total of 10 shops. Miss X starts from shop #1 and goes till last shop. Looking at her pattern of shopping from previous week, a shopkeeper wants to predict the probability of her shopping from his shop this weekend. Can you help the shopkeeper?

Also, find the average amount that she spent in last week.


 item_price = [10 35 2 100 99 87 1 0.5 9 30] 
 total_items_shopped = [ 2 0 5 10 8 9 1 0 0 1]
 Average spending = $73.22
 Probability of shopping from shop# 5 is:0.22

Solution Stats

41.67% Correct | 58.33% Incorrect
Last solution submitted on Nov 30, 2015
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more