Jump to content

'Not'-cha or "I can't believe it's not Gacha" possibilities.


Quistess Alpha
 Share

You are about to reply to a thread that has been inactive for 989 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

more conversation from the update thread

22 hours ago, Mollymews said:

... A consideration for shopkeepers

the fatpack price should be the sum of the single pull probabilities of the items in the machine

for example with the 22 item set:

18 * 5 = 90
 1 * 4 =  4
 1 * 3 =  3
 1 * 2 =  2
 1 * 1 =  1
        ---
        100

 
pull price L$20. 100 * 20 = L$2,000

when the fatpack price is greater than this then is not a good deal. Better off to play the machine

when the machine approaches infinity (as it is designed to do) then the expectation is that the return will be 90,4,3,2,1 for every 100 pulls. 100 * 20 = L$2,000

the consideration for the shopkeeper is that players will take the fatpack price as the indicator of the probability table in the machine (in the absence of any other information)

for example:  Pull price L$20. Fatpack price: $3,000. 3000 / 20 = 150. This indicates that the machine is expected to pay out the 1 rare every 150  pulls. When this is not the case in the example table above

.

3 hours ago, Innula Zenovka said:

How do I go about calculating the likely range of pulls it's going to take to collect a full set?   

If I'm incredibly lucky, and get item different one each pull, it's going to take me 22 pulls.  But to achieve that I have to pull a different item each time, which is very unlikely to happen.     There's a probability curve there somewhere, but I don't know how to calculate that.   

Can anyone assist me?   What's the sort of median spend if I try to collect a full set?  

 

 

43 minutes ago, Mollymews said:

is an interesting topic this for sure, as we could get all 22 in 22 pulls, we could also never get all 22 ever as the algorithm is infinite

for the algorithm to not be infinite then it has to stop

a point at which we could stop is after say 300 pulls with the same player. At which point we give them all the ones that they haven't got already. By stopping, we (as the owner) think that they have given us enough. 300 x 20 = L$6,000. So while this stop is a deviation of the algorithm it can be seen as a good thing for the customer

calculating the probability of getting a result in X pulls is interesting, but it doesn't change the reality that to get at least one of each item the average number of pulls is 100, as the most rare item is 1:100 and the others are less than this 1/100, 2/100, 3/100, etc

 

in reply to Innula's question.

49 minutes ago, Fionalein said:

Bayesian fun.. or do as the engineers do: Monte Carlo it! (simulate 10^6 ++ collectors and assume by law of great numbers your estimate is pretty accurate)

 

2 minutes ago, Mollymews said:

yes can be lots of fun to play with this

is a useful thing to do when we don't know what the probabilities are of each item appearing (event occurring). In which case what we typically do is use an adaptive model on which we do a calculation at each step.  The most simple adaptive model is to count each item as it appears

 

 

  • Thanks 1
Link to comment
Share on other sites

7 hours ago, Mollymews said:

How do I go about calculating the likely range of pulls it's going to take to collect a full set?   

(actually a quote from @Innula Zenovka but the quote system is weird)

As much fun as it is to reason that out by hand, this is a well studied problem, for which you can look up the answer: https://en.wikipedia.org/wiki/Coupon_collector's_problem

TL;DR assuming all the things have the same probability, for N things the expected number of draws is:

Quote

N*log(N)+N*0.577+1/2

For varying probabilities though, (rares, uncommons etc.) Just simulating it is probably the easiest way to get a solution. . .

However. . . solving this exactly by working backwards through a probability tree diagram is quite educational:

Let's take a concrete example where there are 5 items: 3 commons and 2 rares; the probability of getting each specific common is 1/4 and the probability of each specific rare is 1/8. Sanity check: (3* 1/4) + (2* 1/8) = 1

You can represent your current "state" with a Nx2 matrix, where the left column vector represents the number of each item you have for each probability bucket, and the right column vector represents the number you haven't seen in the bag. let's say [[0,0],[2,3]] is the state where you haven't played yet: there are 2 rares and 3 commons in the bag. [[1,1],[1,2]] is the state when you have 1 type of rare, and one type of common (you may have duplicates of either).

Start at the final state [[0,0],[2,3]]; The expected number of rolls to get your complete gacha is 0 (you're already there!). Now, go back a step. To get to this point you either had to have just gotten the rare you needed or you just got your last common. Assuming the former (last rare) case, you would have been in state [[1,3]],[1,0]]; As there's a 1/8 chance of getting a rare, you can reason that your expected number of roles to get that rare is 8. you might get it in 1, or you might take a bagillion tries and never get it, but you can expect to roll an 8-sided die about 8 times in order to get an 8. Similarly for the other case, [[2,2],[1,0]] you can expect to roll 4 times to get a common. Working backwards one more step, there were 3 possible states you could have been in: [[2,1],[0,2]], [[1,2],[1,1]], [[0,3],[2,0]] . For [[0,3],[2,0]] you can reason that the probability of getting one of the two remaining rares is 2*(1/8) = 1/4, so the expected number of rolls to complete the set is 4 to get one of the rares, plus the 8 rolls to get the other = 12. For [[1,2],[1,1]] the probability of getting the rare you need is 1/8, and the probability of getting the common is 1/4. The probability to get either the common or the rare is 1/4+1/8 = 3/8, so the expected number of rolls to get one or the other is 8/3. The expected number of rolls to complete the set at this point is then 8/3 + X where X is the number of rolls you need to make after you've gotten the common or the rare. to calculate X you can just take a weighted sum of the possibilities: the expected number of rolls to complete the set at this point is 8/3 + ((1/8)/(3/8))*4(weighted expected rolls after getting the rare) + ((1/4)/(3/8))*8(weighted expected rolls after getting the common) = 8.

If my math worked out correctly, if you keep working backwards you should get 12+(221/270)=~12.82 as the final expected number of rolls for that example.

Edited by Quistess Alpha
worked example
  • Thanks 1
Link to comment
Share on other sites

Thanks, everyone, for pointing me to the various calculators,  and particular thanks to @Madelaine McMastersfor actually running the calculations  for me at 

 (Patch has now taken pity on the thread and put it out of its misery).

Maddy writes:

Quote

http://www.distributome.org/js/calc/CouponCollectorCalculator.html

If you set the population size (the number of items in the fatpack) to 22 and the stopping point to 22 (you stop when you get them all) and set your acceptable probability of success to 99% (p=0.99), you see that it will take around 166 pulls, giving you 144 duplicates. If you'll settle for just a 50% chance of getting the entire set, you'll still need 76 pulls, with 54 duplicates.

How'd your intuition do, Innula?

My intuition didn't do much more than register that it was going to take more pulls than I could easily calculate, so I turned it off at that point -- with something like this, I deliberately try not to allow myself to form preliminary ideas when I know I don't understand what I'm getting into, at least when it comes to calculating odds, because I've learned all to well how easy it is to lose a lot of money betting on hunches when I don't already have an idea of what the odds look like.

My intuition now, though, is that if I'm trying to collect a full set of 22 without any duplicates, I can probably expect to have to make a little over 3 times as many pulls as there are objects before I'm in sight of my target.

Link to comment
Share on other sites

6 hours ago, Innula Zenovka said:

My intuition didn't do much more than register that it was going to take more pulls than I could easily calculate, so I turned it off at that point -- with something like this, I deliberately try not to allow myself to form preliminary ideas when I know I don't understand what I'm getting into, at least when it comes to calculating odds, because I've learned all to well how easy it is to lose a lot of money betting on hunches when I don't already have an idea of what the odds look like.

My intuition now, though, is that if I'm trying to collect a full set of 22 without any duplicates, I can probably expect to have to make a little over 3 times as many pulls as there are objects before I'm in sight of my target.

I like making "wild guesses" without acting on them. Life might leave me no other choice someday and I want to know how much I should dread that. It's been ages since I thought about the coupon collector's problem, but I did guess around 3x for the number of pulls needed to get a 50% chance at the set of 22. I was a bit low.

Quistessa's wikipedia page link shows the graph of average pull counts to get the full set, for set sizes from 1 to 60. The numbers on that chart don't exactly match those from the calculator I linked. I'll need to think about that a little. The chart is for average number of pulls, the calculator computes the number of pulls for 50% chance of getting the entire set. Those might not be quite the same thing.

800px-Coupon_collector_problem.svg.png

I knew three points from that chart. For a set size of one, one pull guarantees the full set, there's never a 50% probability. For a set of two, it takes two pulls. On the first pull, you have half the set. The second pull has a 50% chance of being the other item. Those are both throwaway bits of knowledge. The real useful tidbit was my recollection that it takes 4x pulls for a deck of cards (52 items). I was a little wrong about that, it's actually about 4.5 (236/52). I hadn't a clue exactly how the ratio grew with set size, but I figured for a set of 22, it would be closer to four than to one. I chose three. I was in the ballpark.

I was lucky this time, my intuition is often standing out in the parking lot behind the left field bleachers. That's why I'm sometimes hesitant to act on it.

I know, I know, sometimes doesn't make up for often.

Edited by Madelaine McMasters
  • Thanks 1
Link to comment
Share on other sites

On 8/12/2021 at 11:53 PM, Mollymews said:

... A consideration for shopkeepers

the fatpack price should be the sum of the single pull probabilities of the items in the machine

for example with the 22 item set:

18 * 5 = 90
 1 * 4 =  4
 1 * 3 =  3
 1 * 2 =  2
 1 * 1 =  1
        ---
        100

 
pull price L$20. 100 * 20 = L$2,000

when the fatpack price is greater than this then is not a good deal. Better off to play the machine

when the machine approaches infinity (as it is designed to do) then the expectation is that the return will be 90,4,3,2,1 for every 100 pulls. 100 * 20 = L$2,000

the consideration for the shopkeeper is that players will take the fatpack price as the indicator of the probability table in the machine (in the absence of any other information)

for example:  Pull price L$20. Fatpack price: $3,000. 3000 / 20 = 150. This indicates that the machine is expected to pay out the 1 rare every 150  pulls. When this is not the case in the example table above

If I properly understand the implications of @Madelaine McMasters's reply, and the results of the Couple Collector calculation,  on average I'm likely to have to spend something between 3 and 3.5 times the pull price multiplied by the number of items in the set before I can collect a full set of 22 items, before we start weighting for rarity values (L$20 x 22 * 3 ==  L$1320.    So if the fatpack costs L$2000,  I'm better off playing the machine at L$20 , because, more often than not, I'll collect a full set before I manage to spend L$2000.

I'm not quite sure how I adjust the calculation to take account of the relative rarity value of some of the items, though, since on each pull I have (e.g.) an 80% chance of drawing one of 18 common items but only a 20% chance of drawing one of the 4 rares (or however I want to configure it).    

(I long ago learned the hard and expensive way that if risk is exciting, you're doing it wrong, which I why I now always seek to clarify this kind of calculation with experts).

Link to comment
Share on other sites

Grrrr, accidentally submitted the post mid-effort. Stay tuned.

Clearly, the probability that I know how to work the forum is small, and declining.

While you're waiting, I just finished one of Rolig's book recommendations...

https://www.amazon.com/How-Not-Be-Wrong-Mathematical/dp/0143127535

I now also recommend it, though I think I might be a lost cause.

Edited by Madelaine McMasters
Link to comment
Share on other sites

6 hours ago, Innula Zenovka said:

If I properly understand the implications of @Madelaine McMasters's reply, and the results of the Couple Collector calculation,  on average I'm likely to have to spend something between 3 and 3.5 times the pull price multiplied by the number of items in the set before I can collect a full set of 22 items, before we start weighting for rarity values (L$20 x 22 * 3 ==  L$1320.    So if the fatpack costs L$2000,  I'm better off playing the machine at L$20 , because, more often than not, I'll collect a full set before I manage to spend L$2000.

I'm not quite sure how I adjust the calculation to take account of the relative rarity value of some of the items, though, since on each pull I have (e.g.) an 80% chance of drawing one of 18 common items but only a 20% chance of drawing one of the 4 rares (or however I want to configure it).    

(I long ago learned the hard and expensive way that if risk is exciting, you're doing it wrong, which I why I now always seek to clarify this kind of calculation with experts).

First, if you are thinking in terms of one individual trying to collect a set, the wikipedia chart isn't terribly helpful. That shows the average number of pulls required to obtain a full set. Half the time you'll need more pulls, half the time less. You're going to do this only once. You want to know how many pulls you're likely to need to achieve some certainty of success better than 50%. The coupon collector calculator allows you to set a desired level of certainty. Even here, you are not guaranteed anything, you night achieve success in the first 22 pulls (1 in 300 million chance), or never (an infinitesimally small chance). Here's a list of desired probabilities of getting the full set and the number of pulls (on average) expected to achieve it, as obtained from the calculator.

50%             76
90%             116
99%             166
99.9%          215

You can see that each 10x reduction in the risk of failure adds a decreasing number of extra pulls, so you converge on success far faster than you drain your wallet.

But again, this isn't what you're looking for. You want to know how many pulls to expect before you pull a rare. If we presume that all rares have the same value, as do all commons, then there are really only two types of things in the set. Rares are 4/22 of the population, commons 18/22. Because items are replaced, the odds don't change as we pull. If we look at the odds of success, we might conclude that each pull increases our odds by 4/22, but that leads to the absurdity of having a probability 24/22 (over 100%!) after just six pulls. In general, probabilities multiply, not add.

The correct way to frame this is "what's the probability of failure?" At each pull, we have an 18/22 chance. The more we pull, the less likely we are to continue failing. Success will eventually come our way. Each pull decreases our chance of failure (F) by 18/22. The chance of failure then becomes F^n, where n is the number of pulls. Success (S), at every step, is 1 minus that probability (1-F).

The following table shows the progression of your chances of success (in %) for the case where there are four rares of equal value, or only one in the set of 22. Once again, these probabilities represent your chances averaged over an endless number of trials. As you'll be doing only one, you might do significantly better or worse at any point along the way. If you want an 50/50 chance of getting one of four rares, expect to pull four times. If you want that same chance with only one rare, get ready to pull 15 times.

If you want a 95% chance of getting any one of the four rares, expect to pull 15 times. Not shown on the chart, if you want a 95% chance of getting the lone rare, expect to pull 65 times.

 

Four

Rares

One

Rare

Pulls

F

S

F

S

1

82%

18%

95%

5%

2

67%

33%

91%

9%

3

55%

45%

87%

13%

4

45%

55%

83%

17%

5

37%

63%

79%

21%

6

30%

70%

76%

24%

7

25%

75%

72%

28%

8

20%

80%

69%

31%

9

16%

84%

66%

34%

10

13%

87%

63%

37%

11

11%

89%

60%

40%

12

9%

91%

57%

43%

13

7%

93%

55%

45%

14

6%

94%

52%

48%

15

5%

95%

50%

50%

16

4%

96%

48%

52%

17

3%

97%

45%

55%

18

3%

97%

43%

57%

19

2%

98%

41%

59%

20

2%

98%

39%

61%

Edited by Madelaine McMasters
  • Thanks 1
Link to comment
Share on other sites

On 8/13/2021 at 11:10 AM, Madelaine McMasters said:

Quistessa's wikipedia page link shows the graph of average pull counts to get the full set, for set sizes from 1 to 60. The numbers on that chart don't exactly match those from the calculator I linked. I'll need to think about that a little. The chart is for average number of pulls, the calculator computes the number of pulls for 50% chance of getting the entire set. Those might not be quite the same thing.

They're not the same thing. TL;DR the "expected" number of pulls is the top point of the graph in the calculator (The "average"/"mean")(about 33%) whereas the 50% mark is the middle (the "median").

I don't at all trust the values I'm getting from that calculator, as they don't align with wikipedia, or a few manual calculations. Again, the relevant calculation here is

Quote

N*log(N)+N*0.577+1/2

Which is a /Very/ good approximation of (N/N + N/(N-1) + N/(N-2) + N/(N-3) ... N/1) or in other words, you can expect to get a new item on your very first pull (Duh). then you have a (n-1)/n chance to get the next thing you don't have so you cna expect to pull n/(n-1) times to get a new thing and so on.

For the case in which there are a few rares and several commons, the best heuristic is to assume you already have all the commons and just want to collect all the rares. (you will probably collect the commons while searching for the rares anyway) The relevant calculation for that where 'R' is the probability of getting a rare, and 'N' is the number of rares:

Quote

1/(R*N) + 1/(R*(N-1)) ... + 1/R

And for a heuristic of the variance, just double the expected number, or add another 1/R (if you played through the expected number of times and didn't complete the set, it's likely you're just missing the last rare)

A decent monte-carlo simulation: https://demonstrations.wolfram.com/CouponCollectorProblem/

Edited by Quistess Alpha
pretend I did actually say "mean" when I meant it.
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

27 minutes ago, Quistess Alpha said:

I don't at all trust the values I'm getting from that calculator, as they don't align with wikipedia, or a few manual calculations. Again, the relevant calculation here is

I wouldn't say I don't trust it at all but it did raise an eyebrow. It produces values close to the wikipedia chart, manual calculations, and Wolfram's calculator, which I didn't link to because it doesn't allow "p" specification. I like your mean vs. median explanation for the discrepancy.

As I noodled on this, I began to wonder what we'd find if we surveyed people for their "expected value" of a gacha pull, before and after exposing the statistics. The house depends on our rosy intuition about these things, so I'd expect the value to decrease. But, what would happen to our variance? When we're all guessing, might our general optimism decrease it?

 

Link to comment
Share on other sites

when there is 1 of each item in the set then the formula is the additive 1 / (N-n) / N) where n is [N..1]

the example classic question is: How many times can we expect to roll a 6 sided die to get at least one of each face given that order is not relevant. The answer is 14.7 rolls

LSL code snippet to calculate this:

default
{
    state_entry()
    {
       integer N = 6;      
       integer n = N;       
       float r;
       do
       {
           r += 1.0 / ((float)n / N);
       } while (--n);
              
        llOwnerSay((string)r);
        
        // when N = 6, r == 14.7
        // when N = 22, r == 81.19789
    }
}

 

 

 

 

  • Thanks 1
Link to comment
Share on other sites

Well, quite the tangent, but I went ahead and monte-carlo'd it in c (I'm sure it'd translate easily enough to LSL, I just didn't think millions of random rolls would be nice for my SL neighbors, tho I'm probably too conservative in that thinking.)

Quote
#include <stdio.h> // for printf
#include <stdlib.h> // for rand
#include <time.h> // for time (needed for seed)
#include <math.h> // for log

float frand(float max)
{	return ((float)rand()/RAND_MAX)*max;
}
int collect_a_set(int nRares, float probRare, int nCommons, float probCommon,int throwaway)
{
	int needed_commons = nCommons;
	int needed_rares = nRares;
	int total_collected=0;
	while(((needed_commons>0) || (needed_rares>0)) && total_collected<=throwaway )
	{
		float prob_check = frand(1.0);
		float new_common = probCommon*needed_commons;
		float new_rare = new_common+needed_rares*probRare;
		if(prob_check<=new_common)
		{
			--needed_commons;
		}
		else if(prob_check<=new_rare)
		{
			--needed_rares;
		}
		++total_collected;
		//printf("total:%d\n  needed:%d %d\n  check:%f : %f %f\n",total_collected,needed_commons,needed_rares,prob_check,new_common,new_rare); // debug
	}
	//printf("%d \n",total_collected); // debug.
	return total_collected;
}
float partial_collection(float prob,int num)
{
	int loop = num;
	float ret=0;
	while(loop>0) ret+=1/(prob*loop--);
	return ret;
}

//needed varibles : nRares, rarity_factor, nCommons, nBins, bin_size, nTrials.

int main( int argc, char *argv[])
{
	if(argc!=7)
	{	printf("Usage: %s <number of rares> <rarity factor> <n commons> <number of 'bins' to show> <size of each bin> <number of trials to conduct>\n",argv[0]);
		return 1;
	}
	// fetch arguments:
	int nRares 			= atol(argv[1]);
	float rarity 		= atof(argv[2]);
	int nCommons		= atol(argv[3]);
	int nBins			= atol(argv[4]);
	int bin_size		= atol(argv[5]);
	int nTrials			= atol(argv[6]);

	int nCoupons = nRares+nCommons;
	//float probRare 		= rarity/nCoupons;
	float probRare = 1/(nRares + rarity*nCommons); // if rarity = 2, a rare is twice as rare as a common.
	float probCommon	= (1-(probRare*nRares))/nCommons;
	printf("Prob rare: %f\nProb common: %f\ntotal: %f\n",probRare,probCommon,probRare*nRares+probCommon*nCommons);
	printf("Expectation (if p rare = p common) : %f\n",nCoupons*log(nCoupons)+0.5772156649*nCoupons+0.5);
	printf("Heuristic Expectation (only collect rares) : %f\n",partial_collection(probRare,nRares));
	int throw = 10+nCoupons+bin_size*nBins; // after this manny attempts we're not counting results anyway so stop trying.
	// use time as a random seed:
	srand(time(0));
	#define BIN_MAX 25
	if(nBins>BIN_MAX)
	{	printf("Error: maximum number of bins is %d.\n",BIN_MAX);
		return 2;
	}
	int bins[BIN_MAX] = {0}; // counting on this to initialize all elements to 0.
	// bin[0] holds results from nCoupons to nCoupons+bin_size-1, bin[1] holds the next bin_size results etc. 

	int trial;
	for(trial=0; trial < nTrials;++trial)
	{
		int result = collect_a_set(nRares,probRare,nCommons,probCommon,throw);
		int bin;
		for(bin=0;bin<BIN_MAX;++bin)
		{
			if(result<nCoupons+(bin_size*(bin+1)))
			{
				++bins[bin];
			}
		}
	}

	// print the bins array:
	int i;
	printf("N Draws:\t");
	for(i=0;i<nBins;++i)
	{	printf("%d\t",nCoupons+((i+1)*bin_size));
	}printf("\n");

	printf("Cumulative:\t");
	for(i=0;i<nBins;++i)
	{	printf("%d\t",bins[i]);
	}printf("\n");

	printf("This Bin:\t");
	int prev = 0;
	for(i=0;i<nBins;++i)
	{	printf("%d\t",bins[i]-prev);
		prev = bins[i];
	}printf("\n");

	return 0;
}

(I've found quotes are collapsible, whereas regular code blocks are not)

(to compile use "gcc -lm <filename>" . For some reason gcc needs to be told explicitly to Link the Math library)

This gives results like:

Quote

Usage: ./a.out <number of rares> <rarity factor> <n commons> <number of 'bins' to show> <size of each bin> <number of trials to conduct>

> ./a.out 5 2 15 15 10 100000

Prob rare: 0.028571
Prob common: 0.057143
total: 1.000000
Expectation (if p rare = p common) : 71.958959
Heuristic Expectation (only collect rares) : 79.916664
N Draws:     30      40      50      60      70      80      90      100     110     120     130     140     150     160     170
Cumulative:  28      1533    8291    20665   35774   49982   61862   71579   78839   84368   88413   91373   93617   95252   96389
This Bin:    28      1505    6758    12374   15109   14208   11880   9717    7260    5529    4045    2960    2244    1635    1137

Or in other words, if there are 5 rares and 15 commons, and rares are twice as rare (half as probable per-unit) as commons, then to have a 50% chance of getting the whole set you need to draw about 80 times, or about 140 times for a 91% chance.

After a little playing around, I found my heuristic of "only try to collect the rares" only makes sense (gives a higher value than flat expectation) when the rarity factor is around 2 or more.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 8/15/2021 at 12:34 AM, Innula Zenovka said:

If I properly understand the implications of @Madelaine McMasters's reply, and the results of the Couple Collector calculation,  on average I'm likely to have to spend something between 3 and 3.5 times the pull price multiplied by the number of items in the set before I can collect a full set of 22 items, before we start weighting for rarity values (L$20 x 22 * 3 ==  L$1320.    So if the fatpack costs L$2000,  I'm better off playing the machine at L$20 , because, more often than not, I'll collect a full set before I manage to spend L$2000.

I'm not quite sure how I adjust the calculation to take account of the relative rarity value of some of the items, though, since on each pull I have (e.g.) an 80% chance of drawing one of 18 common items but only a 20% chance of drawing one of the 4 rares (or however I want to configure it).    

(I long ago learned the hard and expensive way that if risk is exciting, you're doing it wrong, which I why I now always seek to clarify this kind of calculation with experts).

i just make a point about this

calculating the mean is relatively easy to formulate for most sets. Calculating the median on the other hand is a little bit more complicated, and it is the median that players are most interested in.  As it is around the median that most pulls/rolls/spins fall

for example: Two standard dice.  Adding the thrown values together, the mean is 9.14.  The median is 7

a thing for players and operators tho who go down this path to far is that they can fall down the rabbit hole of the maturity of chance doctrine. Operators who set the fatpack price based on mean/median are lending support to this doctrine

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Mollymews said:

i just make a point about this

calculating the mean is relatively easy to formulate for most sets. Calculating the median on the other hand is a little bit more complicated, and it is the median that players are most interested in.  As it is around the median that most pulls/rolls/spins fall

for example: Two standard dice.  Adding the thrown values together, the mean is 9.14.  The median is 7

a thing for players and operators tho who go down this path to far is that they can fall down the rabbit hole of the maturity of chance doctrine. Operators who set the fatpack price based on mean/median are lending support to this doctrine

 

While calculating the median and mode are often more difficult than calculating the mean, in the two dice example, they're all 7. A two die roll produces a symmetrical probability distribution, for which mean, median, and mode are the same value.

https://lh3.googleusercontent.com/proxy/xiIf2QR5fO0Ae1yI7XlzXlmTCCmC13kPzi_armGBFTan9K6UPcMqL5CU_eAEv_6mjGJoSJVKIRYDP5LG4y6pzEyv8QhqxU18rcrKVNBtO7dv4Wd0r9CPCrslGHuDyCViMROXM962LIjxV0cm6CFQ8VpVZbqnnnGB1EAMhttps://d32ogoqmya1dw8.cloudfront.net/images/quantskills/methods/diceroll2.gif

Did I miss something, Molly?

 

 

 

Edited by Madelaine McMasters
  • Like 1
  • Thanks 2
Link to comment
Share on other sites

I haven't had time to dig into the discrepancy between the coupon collector calculator I found and chart in the wiki page Quistessa linked, but I did have enough time to notice that, if I increased p to 0.6, it produced values almost exactly matching the wiki chart. This is bugging me and I will tackle it when I find the time.

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Madelaine McMasters said:

 

While calculating the median and mode are often more difficult than calculating the mean, in the two dice example, they're all 7. A two die roll produces a symmetrical probability distribution, for which mean, median, and mode are the same value.

https://lh3.googleusercontent.com/proxy/xiIf2QR5fO0Ae1yI7XlzXlmTCCmC13kPzi_armGBFTan9K6UPcMqL5CU_eAEv_6mjGJoSJVKIRYDP5LG4y6pzEyv8QhqxU18rcrKVNBtO7dv4Wd0r9CPCrslGHuDyCViMROXM962LIjxV0cm6CFQ8VpVZbqnnnGB1EAMhttps://d32ogoqmya1dw8.cloudfront.net/images/quantskills/methods/diceroll2.gif

Did I miss something, Molly?

 

 

 

no you never, i missed it. Is 252 / 36 = 7

Link to comment
Share on other sites

8 hours ago, Mollymews said:

a thing for players and operators tho who go down this path to far is that they can fall down the rabbit hole of the maturity of chance doctrine. Operators who set the fatpack price based on mean/median are lending support to this doctrine

I'm very ready to be persuaded I'm wrong here, since I know I don't really understand probabilities that well, but it seems to me that, while I'm very aware of the dangers of the maturity of chance fallacy  if you're a gambler, it isn't such a fallacy if you're the house, and certainly not if you're the owner of a gacha or conveyor belt machine, because then you're risking nothing but foregoing the extra money you might have made had you set the fatpack price rather differently, since the house/conveyor belt owner is interested not in the outcome of any particular pull or sequence of pulls but in how many pulls are made during the course of a week by anyone.   

However long it might take me, and however much it might cost me, to collect a full set of rares and commons on my own, the owner of a popular gacha or conveyor belt should, or so it seems to me, be able to predict, with a reasonable degree of certainty, what, over several days, the outcome of several thousands or tens of thousands of pulls will look like, and this prediction will be even more accurate for the outcome over a year,  and it's their weekly and annual figures they're interested in,  not the outcome of any particular pull or short sequence of pulls.

ETA:  While the fact that Red or Evens won on a particular spin of the roulette wheel doesn't tell me anything about what will happen on the next spin, I think I can be reasonably confident that, the more times I spin the wheel (I'm playing as the house) the more likely Red and Black are going to even out over time, and if they don't, I'll probably ask my security people to pull out the wheel for tests and replace it with a new one, and to take a close look at the CCTV recordings. 

  

Edited by Innula Zenovka
  • Like 1
Link to comment
Share on other sites

 

52 minutes ago, Innula Zenovka said:

Ithe owner of a popular gacha or conveyor belt should, or so it seems to me, be able to predict, with a reasonable degree of certainty, what, over several days, the outcome of several thousands or tens of thousands of pulls will look like, and this prediction will be even more accurate for the outcome over a year,  and it's their weekly and annual figures they're interested in,  not the outcome of any particular pull or short sequence of pulls.

  

 yes

as a player we should understand it as the game operator understands it

the 22 item set, which Da5id constructed, is


[1,2,3,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
 A B C D E F G H I J K L M N O P Q R S T U V

1 A, 2 Bs, 3 Cs, 4 Ds, 5 Es .. 5 Vs. Total 100

a game operator of this set, expects that (over the long run) for every 100 pulls there will be 1 complete set (22 items) given to the players, and 78 items given that make up partial sets. 22 + 78 = 100

1 x [ABCDEFGHIJKLMNOPQRSTUV]
1 x [BCDEFGHIJKLMNOPQRSTUV]
1 x [CDEFGHIJKLMNOPQRSTUV]
1 x [DEFGHIJKLMNOPQRSTUV]
1 x [EFGHIJKLMNOPQRSTUV]

at L$20 a pull the expected return to the game operator for each complete set [ABCDEFGHIJKLMNOPQRSTUV]is L$2,000. L$20 x 100 = L$2,000

while is fun to play about with whats my chances of getting a complete set in X pulls, the operator expects to give 1 complete set for every L$2,000 put into the machine

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, Innula Zenovka said:

the more likely Red and Black are going to even out over time

I too am less than comfortable when it comes to probability, but I think the trend is this case is that the difference between the number of reds or blacks relative to the number of spins tends to level out, rather than the difference between the numbers themselves.

  • 10 spins: 4 red, 6 black; difference 2, red 40%
  • 100 spins: 45 red, 55 black; difference 10, red 45%
  • 1000 spins: 475 red, 525 black; difference 50, red 47.5%

Even though the difference between the number of reds and blacks is increasing in this example, the percentage is trending towards 50%.

Edited by KT Kingsley
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

2 hours ago, Mollymews said:

 

 yes

as a player we should understand it as the game operator understands it

the 22 item set, which Da5id constructed, is


[1,2,3,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
 A B C D E F G H I J K L M N O P Q R S T U V

1 A, 2 Bs, 3 Cs, 4 Ds, 5 Es .. 5 Vs. Total 100

a game operator of this set, expects that (over the long run) for every 100 pulls there will be 1 complete set (22 items) given to the players, and 78 items given that make up partial sets. 22 + 78 = 100

1 x [ABCDEFGHIJKLMNOPQRSTUV]
1 x [BCDEFGHIJKLMNOPQRSTUV]
1 x [CDEFGHIJKLMNOPQRSTUV]
1 x [DEFGHIJKLMNOPQRSTUV]
1 x [EFGHIJKLMNOPQRSTUV]

at L$20 a pull the expected return to the game operator for each complete set [ABCDEFGHIJKLMNOPQRSTUV]is L$2,000. L$20 x 100 = L$2,000

while is fun to play about with whats my chances of getting a complete set in X pulls, the operator expects to give 1 complete set for every L$2,000 put into the machine

To follow on from this.. Yes, I was looking it as a game operator, but one informed by being a math-geek as well as an ex-carnie. I knew from that combination that the "perceived cost" of a full set  or of a particular rare was going to be MUCH lower than what an average punter would actually pay to get it.

Now, I explicitly did NOT model it mathematically, I knew the formulae around the coupon collector problem - in fact in one of my college stats courses I was challenged to derive some of them from first principles! - but instead I focused on an entirely empirical approach, creating a disgustingly simplistic model of player behavior based just on how I've seen punters playing games I operated (or shilled for, my task being to wander from game to game and if the operator tipped me the nod to step up, play and "win", then go dump the prize back in storage and start over.)

The simulated players "should" have been clustered around the median number of pulls to get a whole set (once they had, they were coded to "lose interest" and just make infrequent "casual pulls" for "fun") but I'd built in extra enthusiasm for when they could "see" more items on the conveyor that they hadn't already got and a LOT of it if they could see the ONLY item they hadn't got...  Sometimes the control code let another player "snipe" the item(s) the "enthusiastic" player was actually aiming for and it was more likely that another player could gain control of the machine before that item was up the more items to go before it there were....

This pushed the simulated players number of pulls from being binomially distributed around the mean to peaking just under 1 standard deviation above the binomial mean and having a more substantial tail towards higher numbers of pulls (looked more like an up-shifted poisson distribution), which, from experience as a game operator, is exactly what you see in people... The closer they think they are to a "big win" the less impact a loss has on their thinking. The math only makes sure the game operator can't lose. The psychology makes the real profit.

Edited by Da5id Weatherwax
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, KT Kingsley said:

I too am less than comfortable when it comes to probability, but I think the trend is this case is that the difference between the number of reds or blacks relative to the number of spins tends to level out, rather than the difference between the numbers themselves.

  • 10 spins: 4 red, 6 black; difference 2, red 40%
  • 100 spins: 45 red, 55 black; difference 10, red 45%
  • 1000 spins: 475 red, 525 black; difference 50, red 47.5%

Even though the difference between the number of reds and blacks is increasing in this example, the percentage is trending towards 50%.

this is a interesting thing as well

gambler statement: Over the long run we can expect red and blacks to 'even up'

which as you are pointing out doesn't mean that over the long run we can expect there to be as many reds as there are blacks. The longer the run the more likely it is that there won't be as many reds as there are blacks, or conversely as many blacks as there are reds

if we spin 2 times then over the set of all spins of length 2 then we get

00
01
10
11

2 out of 4 times is there a 0 and a 1. A 0.5 probability

formula: p = combine(N,N/2) / power(2,N) where N is the length

N = 2, p = 0.5.   2/4
N = 4, p = 0.375. 6/16
N = 8, p = 0.273. 70/256
N = 16, p = 0.196. 12870/65536

for N = 512 then p = 0.035. Is a 3.5% probability that there will be an equal number of red and black. 96.5% of the time the numbers will be unequal

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

i just say that I am not a mathematician, I am more a arithmetician meaning that I tend to count things up on my fingers and sometimes I run out of fingers and get it wrong 😽

i only know some things about this, as I am into exploring/writing data compression algorithms, which typically use statistical methods to model data. The closer the model is to the data the better compression can be achieved. Not that I have ever written anything special in this field, I just find it interesting to dabble in

Link to comment
Share on other sites

On 8/4/2021 at 12:43 AM, Quistess Alpha said:

 

I think there are a variety of ways to make a vendor that still fits the spirit of "Gacha" but remains within the letter (and to varying degrees the spirit) of the policy.

 

I guarantee you that the most successful "gacha replacement" scripts will stretch the limits of the policy's letter until they creak and, if you're lucky, you might find its spirit in a dumpster on the other side of town, provided you get there before the garbage truck...

As a scripter, I intend to avoid these like a dose of the clap. Won't make them, no matter how much anyone offers me for the time to do it. Aside from how I feel about this particular marketing method, I dont want my name on "the script that made LL go nuclear." I've enough honest projects on my plate without swimming in waters that murky.

  • Like 2
Link to comment
Share on other sites

4 hours ago, Da5id Weatherwax said:

The math only makes sure the game operator can't lose. The psychology makes the real profit.

My emergency backup kid spent a year working for a company that supplied components to casino gambling machine manufacturers. He learned of interesting techniques designed to keep people in their seats, actually including pressure sensors in those seats that could measure "fidgetyness" and eye tracking cameras to see what's grabbing your attention. It's not legal to toy with the game probabilities, so they toy with everything else. If they sense you're getting restless, they'll change up the game graphics to entice you to stay. Unoccupied machines behave in ways designed to draw you into the area.

I have no doubt that psychology is front and center in a casino's game plan.

  • Sad 1
Link to comment
Share on other sites

adding more to the conversation

suppose a shopkeeper wanted to sell each item individually, as well as a fatpack, and also provide a conveyor for their customers.  With the idea that overall the shopkeeper can expect to get the same amount of money whichever method the customers use to buy their products

a way to work out the individual item prices is:
 

default
{
    state_entry()
    {
        // change the bin list to whichever
        list bin = [1,2,3,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];

        // change the pull_price to whichever
        integer pull_price = 20;
        
        integer bin_sum = (integer)llListStatistics(LIST_STAT_SUM, bin);
        integer fatpack_price = bin_sum * pull_price;  

        integer i;
        list item_prices;
        integer len = llGetListLength(bin);
        // sum the probabilities of the items
        float prob_sum;
        for (i = 0; i < len; i++)
        {
            float prob = (float)bin_sum / llList2Float(bin, i);
            prob_sum += prob;
            item_prices += [prob];
        }

        // set the price multiplier
        prob_sum = (float)fatpack_price / prob_sum;

        // set the item prices
        integer overage = fatpack_price; // handle rounding
        for (i = 0; i < len; i++)
        {
            integer price = llFloor(llList2Float(item_prices, i) * prob_sum);
            overage -= price;
            item_prices = llListReplaceList(item_prices, [price], i, i);
        }

        // add any overage to the 0th item (the presumed 'rare')
        item_prices = llListReplaceList(item_prices, [llList2Integer(item_prices, 0) + overage], 0, 0);

        // check: if prices_sum != fatpack_price then error
        integer prices_sum = (integer)llListStatistics(LIST_STAT_SUM, item_prices);

        llOwnerSay("Fatpack price: " + (string)prices_sum + ". Item prices: " + llList2CSV(item_prices));   
    }
}

for the 22 set being referenced then the prices are:

Fatpack price: 2000. Item prices: 361, 175, 117, 87, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70

  • Thanks 1
Link to comment
Share on other sites

On 8/17/2021 at 4:47 AM, Innula Zenovka said:

I'm very ready to be persuaded I'm wrong here, since I know I don't really understand probabilities that well, but it seems to me that, while I'm very aware of the dangers of the maturity of chance fallacy  if you're a gambler, it isn't such a fallacy if you're the house, and certainly not if you're the owner of a gacha or conveyor belt machine, because then you're risking nothing but foregoing the extra money you might have made had you set the fatpack price rather differently, since the house/conveyor belt owner is interested not in the outcome of any particular pull or sequence of pulls but in how many pulls are made during the course of a week by anyone.   

However long it might take me, and however much it might cost me, to collect a full set of rares and commons on my own, the owner of a popular gacha or conveyor belt should, or so it seems to me, be able to predict, with a reasonable degree of certainty, what, over several days, the outcome of several thousands or tens of thousands of pulls will look like, and this prediction will be even more accurate for the outcome over a year,  and it's their weekly and annual figures they're interested in,  not the outcome of any particular pull or short sequence of pulls.

ETA:  While the fact that Red or Evens won on a particular spin of the roulette wheel doesn't tell me anything about what will happen on the next spin, I think I can be reasonably confident that, the more times I spin the wheel (I'm playing as the house) the more likely Red and Black are going to even out over time, and if they don't, I'll probably ask my security people to pull out the wheel for tests and replace it with a new one, and to take a close look at the CCTV recordings.

In theory, your theory is correct, but I don't imagine SL sellers are more mathematically savvy than the rest of us. Look how much time we've spent here, trying to work out the probabilities. What vendor is as curious (or screwy) as this lot?

In a sense,  gacha vendors are gambling too. Setting prices and selling mechanisms are gambles, based on hunch as much as market analysis. I think Da5id correctly gauges that the psychology of a sales method, which often involves misjudging probabilities, is usually more important than the actual probabilities, to both buyer and seller. Sellers have one advantage over buyers, they set the rules of the game. Are they savvy enough to predict, or do they just throw methods against the wall, see what sticks, and adjust accordingly? I know what I'd do.

On 8/17/2021 at 8:18 AM, Da5id Weatherwax said:

The math only makes sure the game operator can't lose. The psychology makes the real profit.

The psychology can be so good that the game operator makes a profit even when the math works in the gamer's favor. Loss leader, anyone?

Want to beat the house at a casino? Go there to eat.*

 

*and take your chances with e.coli or Covid-19 ;-).

  • Thanks 3
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 989 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...