- Details
- Parent Category: Programming Assignments' Solutions
We Helped With This Statistics with R Economics Homework: Have A Similar One?

Category | Economics |
---|---|
Subject | R | R Studio |
Difficulty | Undergraduate |
Status | Solved |
More Info | Economics Rstudio Homework |
Assignment Description
DBA3803/DSC3216: Predictive Analytics in Business
Homework 1
Due 11 Feb 2019 via IVLE
Problem 1 (GrabWheels)
Towards the smart nation initiative, the government has encouraged sustainable and smart mobility solutions such as recent scooter vehicle sharing (e.g., GrabWheels).
Launched in the late 2018, GrabWheels rolled out around 30 parking locations in NUS Kent Ridge campus. For more details, please see http://news.nus.edu.sg/press-releases/new-e-scootersharing-service and https://www.grab.com/sg/wheels/.
A group of DBA3803/DSC3216 students are working on a project in the design and operations of GrabWheels at NUS campus, e.g., where to set up the parking locations and how many scooters to place at each location. Please answer the following questions.
a) Suppose GrabWheels wants to improve its service quality by optimizing parking locations and calculating the optimal number of scooters at each location. Please suggest what information would help and what data GrabWheels needs to collect. [2 pts]
b) By Feb 2019, GrabWheels has collected 2-month data from its operating 30 locations. To forecast the demand for new locations, e.g., COM2, briefly discuss which data mining task should be performed and what additional data sets should be collected, if any. [2 pts]
c) Following part (b), briefly discuss how GrabWheels can forecast the demand scooter sharing at new locations, using your proposed approach. Please identify which steps are the process of data mining (DM), or the use of the results of data mining (Use). [2 pts]
d) Discuss what challenges GrabWheels may face and how data analytics can help improve its operations and profitability. [2 pts]
Problem 2
The analytics consulting group DAO wants to forecast the demand for “Apple iPad Air 16GB Wifi” with past transactions. Its demand forecasting team is currently analyzing the transactions from November 2014 to July 2015 (“ipad_air_data.csv”). Please fill in the table and make recommendations. (Each row represent 1 unit of iPad shipment, regardless of order id and shipment id.)
1. What are the monthly sales from Nov 2014 to Jul 2015? [1 pts]
2. Find the forecast demand for each month, starting with Feb 2015, using a 3-month moving average. [2 pts]
3. Use exponential smoothing with a smoothing constant of 0.5 and an initial value equal to the sales of Nov 2014, to forecast for Nov 2014 to Jul 2015. [2 pts]
4. Use Holt’s method with α=0.3 and β=0.1, to forecast for Nov 2014 to Jul 2015. (Set the first estimate of level equal to the first observation and the first trend to zero.) [2 pts]
5. Evaluate the forecasting methods using MAD, for the periods Feb-Jul 2015. [1 pts]
6. Evaluate the forecasting methods using MAPE, for the periods Feb-Jul 2015. [1 pts]
7. Discuss the performance of the forecasting methods, e.g., any suggestions for improvement. [1 pts]
t | Year | Month | Sales | MA(3) | ES (α=0.5) | Holt’s (α=0.3, β=0.1) |
1 | 2014 | Nov |
| -- | -- | -- |
2 |
| Dec |
| -- |
|
|
3 | 2015 | Jan |
| -- |
|
|
4 |
| Feb |
|
|
|
|
5 |
| Mar |
|
|
|
|
6 |
| Apr |
|
|
|
|
7 |
| May |
|
|
|
|
8 |
| Jun |
|
|
|
|
9 |
| Jul |
|
|
|
|
Problem 3 (R e-learning)
Learning a programming language requires hands-on exercises. If you wish to use R language for the assignment problems, please take a few hours to follow the online learning materials below. 1. Easy: NUS BACT R Tutorials https://nusbact.com/tutorial-series/r-tutorial-series/
2. Intermediate: DataCamp R tutorial series https://www.youtube.com/watch?v=SWxoJqTqo08&list=PLjgj6kdf_snYBkIsWQYcYtU ZiDpam7ygg [Watch the videos and follow the steps in RStudio]
3. Optional: you may continue to try all the codes in Prof. Wang Tong’s tutorials with linked provided in Lecture 2 notes.
No requirement for submitting anything for this problem. If you wish to use other tools for the assignments, e.g., Python, you may safely skip this part.
Problem 4 (car2go)
As of July 2017, car2go is the largest car sharing company in the world with 2,500,000 registered members and a fleet of nearly 14,000 vehicles in 26 locations in North America (e.g., https://www.car2go.com/US/en/new-york-city/), Europe and Asia. [ref:
https://en.wikipedia.org/wiki/Car2Go]
car2go operated in San Diego California using a pure electric vehicle (EV) fleet, between November 2011 and December 2016. The service region of car2go consisted of 16 zip codes and vehicles were available within the defined boundary, as shown in the Figure below.
We have collected the vehicle status data between March and April, 2014, at every 5-min interval. For DBA3803/DSC3216, we have pre-processed the vehicle status data to identify vehicle trips. We also explain the columns in the table below.
Column name(s) | Explanation |
car_id | plate number of a car |
origin_zip, dest_zip | zip code of the trip origin, destination |
origin, origin_longitude, origin_latitude | GPS location of origin, in longitude and latitude |
destination, destination_longitude, destination_latitude | GPS location of destination, in longitude and latitude |
origin_address, destination_address | addresses of origin and destination |
origin_fuel, destination_fuel | fuel levels at origin and destination |
origin_time, destination_time, origin_hr, dest_hr, SD_hr | Recorded time/hour (in GMT+8) of trip started at origin and ended at destination. SD_hr is the hour converted into San Diego local time. |
travel_time | calculated travel time in minutes |
distance | the distance between the start and end locations of trips in meters |
sample_day | the index of days in the sample, starts from 1 |
day_of_week | day of the week of the recorded trip |
In the following, we will analyze the trip data (car2go_data) and try to understand its operations.
a) Report the number of cars and total trips observed in the data set. [1 pts]
b) Plot the histogram of travel times for trips with distance less than 2000 meters. Discuss your observation on whether there are significant customers using car2go for one-way trips. [2 pts]
c) Count the trips for each SD hour on each sample day. (Hint: use functions “count” and “group_by” in package “plyr” and “dplyr”). Report the first 6 readings of trip counts, in time sequence of sample day and SD hour. [1 pts]
d) Due to disconnections in web-crawling, not every sample day has observations for all 24 hours. For the following study, we only include observations between sample day 10 to 26. Construct the time series using function “ts” and specify the frequency to 24 hours.
Plot the time series of trip numbers over sampled hour and day and discuss the pattern. [2 pts]
e) Plot ACF and PACF to identify potential AR and MA model. [2 pts]
f) Identification of best fit ARIMA model. Explain the resulting model, e.g., any (seasonal) differencing. [2 pts]
g) Forecast hourly trips for the next 48 hours using the best fit ARIMA model. [2 pts]