I have a population of sales that might be won or lost. I know the rate that they are won from historical data. This case 30% of them historically win. To figure out how much money I will be making off of these sales I need to weight them. I could just add up all the values of the sales then take 30% of that number, but there is high variance in what the value of single sales are.

> describe(Dataset$V1)
      var    n     mean      sd median  trimmed   mad  min     max    range  skew
    1   1 2314 185090.7 1129744  32000 52077.27 37065 1000 3.5e+07 34999000 19.26
      kurtosis       se
    1    478.5 23485.42
    > sum(Dataset$V1)*.3
     [1] 128489970

So I figured that if you win 30% of them then let's try sampling the population at a win rate of 30%. I ran the following code

#Put the Percentage Value you want to use here
P <- .30
X <- round(nrow(Dataset)*P)
#Figured out how many wins will be based on different sample sizes.
boot <- data.frame(
  boot = replicate(10000, sum(sample(Dataset$V1, size=X)))
write.csv(boot, file=ThePath, row.names=FALSE)

I have replacement as False because a single sale can't be won more than once. I do know that only the very first sale is picked at a 30% rate and the rest are picked at a slightly lower rate due to no replacement.

So it randomly takes 30% of the data and then adds it up because I only care about the total expected value. I have it do this 10,000 times then I turned it into a histogram to see the distribution. Then have it set up to calculate what % of the 10,000 runs each bin has. Then look for about 8000 or 80% of the values in sequential bins.

Can I then say that 80% of the time in a simulation of 10,000 the expected total value of the sales is expected to be within X and X? Or should I be using a normal bootstrap confidence interval calculation? Does the fact that the original data is skewed create issues and in some of the datasets when I run this code the Bootstrapped data comes out almost bimodal, does that lead to problems also?

  • 1
    $\begingroup$ I would question your choice of sampling without replacement, because this is inconsistent with your assumptions and objectives. You are using the historical data as a proxy for future sales. Those future sales will not act like draws from a finite population of sales; instead--assuming the future is like the past and all sales are independent--they will act like ongoing draws with replacement from a fixed sales distribution. $\endgroup$ – whuber Dec 6 '12 at 8:35
  • 2
    $\begingroup$ @whuber I think the future population of potential sales is known, just not which will be won & which lost. $\endgroup$ – Scortchi Dec 6 '12 at 12:21
  • $\begingroup$ You're assuming that you'll win exactly 30% of the sales. It could be better to let this proportion vary a bit. $\endgroup$ – Scortchi Dec 6 '12 at 12:24
  • $\begingroup$ @Scortchi you are correct the future population of potential sales is known. Also as for exactly 30%, I thought about that but don't know how to implement that currently. Also I rounded down the win % that were calculated so 34% became 30%. As over estimating is worse than underestimating in these cases. $\endgroup$ – DanTheMan Dec 6 '12 at 15:42
  • 1
    $\begingroup$ @whuber The historic data is just used to figure out win rates, the future potential sales are known at each time of calculation from open bids/sales. Due to the fact that the future potential sales are known and I am trying to figure out how much those are all "worth". We know that only 30% of these potential sales will become real revenue. With replacement a single potential sale can win twice, and that is not possible as once something is won it can't be won again. $\endgroup$ – DanTheMan Dec 6 '12 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.