How to get a sample with a specific % of success

RccScln

New Member
Joined
Jul 27, 2016
Messages
27
I am trying to modelling a leasing portfolio.
Now I have to generate a sample from the original population of the assets that will be repossessed.
Ex.
We have 10 cars. The percentage of the cars that will be repossessed is 20%.
We have 10 boats. The percentage of the boats that will be repossessed is 70%.

So I need to obtain a variable (that has value 0 if not repossess and 1 if will be repossess) that follows those rules.

Which formula should I use?

What I did (not very sophisticated) was ordering them by asset type and then, for the 20% prob I gave a value of 1 every 5 rows.

Thank you so much in advance.

Rocco
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I'm not sure what headings you're using but if you used a sumif/countif it would give you the percentage of repossessed over total.
 
Upvote 0
Maybe I was not clear. This what I mean:

ASSET TYPE
Last Appraisal Value
Repossessable
strumentale
154.147
1
strumentale
92.052
0
strumentale
365.668
0
strumentale
2.384
0
strumentale
12.147
1
strumentale
20.049
0
strumentale
498
0
strumentale
11.473
0
strumentale
12.966
1
strumentale
50.208
0
strumentale
14.072
0
strumentale
53.619
0
strumentale
53.619
1
strumentale
997
0
strumentale
797
0
strumentale
996
0
strumentale
2.042
1
strumentale
847
0
strumentale
41.142
0
strumentale
8.199
0

<tbody>
</tbody>

Thank,
rocco
 
Upvote 0
One way:

A​
B​
C​
1​
Boats
Repo
2​
10​
7​
3​
Boat #
Repo?
4​
1​
1​
B4 and down: =--(RAND() < (($B$2 - SUM(B$3:B3)) / ($A$2 - ROWS(B$3:B3) + 1)))
5​
2​
1​
6​
3​
1​
7​
4​
1​
8​
5​
0​
9​
6​
1​
10​
7​
0​
11​
8​
1​
12​
9​
1​
13​
10​
0​
14​
7
B14: =SUM(B4:B13)
 
Upvote 0
Hi RccScln, as you have not replied to either of us, I assume this is now resolved. I shall unsubscribe, however, should you require additional assistance, do not hesitate to message me directly.

 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top