O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example – simulating customer service calls

In this example, we can simulate calls to the customer service which might occur at the beginning and at the end of the week. Management projects that weekend volume will be heavy, with an average of 1500000 calls and an average turnaround time of 4 minutes. Customer service call volume for Monday-Thursday is estimated as handling 1000000 calls with an average turnaround time of 1 minute. We could use this simulation to build a model to include weekends versus nonweekends as new variables in a predictive model:

library(ggplot2) library(grid) library(gridExtra) set.seed(123) MonTuesWedThurs=rnorm(1000000,1,1) FriSatSun=rnorm(1500000,4,1) weekly = c(MonTuesWedThurs,FriSatSun) 

If we were interested ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required