Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem bugging me for some time. I am developing a game and need to calculate the percentage of the capacity of a stadium that will be filled in relation with some factors:

  • other team reputation (Guest team) (from 0 to let's say maximum 150)
  • ticket prices (the standard price will be 40)
  • fans state of mind towards their own team (Home team) (0 bad, 1 medium, 2 good, 3 very good)
  • stadium upgrades (parking, shops, heating) each with levels from 0 to 4

Has anyone got a good idea of how i could calculate this?

Are there any other factors that i should take in account?

share|cite|improve this question
up vote 0 down vote accepted

What you should really do, if you want this to reflect reality, is get your hands on some data and fit a model. However, assuming that's out of the question, let's talk about how you might put together something semi-realistic.

When trying to predict a percentage from some numerical factors, a common approach is to use logistic regression. Here each factor is first normalized so that its values lie in roughly the same range (this isn't strictly necessary, but it makes things easier to think about). So your four factors might be scaled and translated so that they all lie in [-1,1], where -1 represents the worst value possible and 1 the best value.

Lets refer to the scaled factors as $X_i$. For example, if we labeled the factors by 1. Opponent's reputation, 2. Ticket price, 3. Support of fans and 4. Stadium quality then we might have

  • Opponent's rep = 100 (a good reputation)
  • Ticket price = 60 (expensive tickets)
  • Fan support = 2 (good support)
  • Stadium upgrades 4 (good stadium quality)

which could translate into the following factors:

$$X_1 = 0.5, \qquad X_2 = 1, \qquad X_3 = 0.5, \qquad X_4 = 0.5$$

Then you assign a score $\theta_i$ to each factor $X_i$ which represents how much you want it to affect the output, and also a parameter $\theta_0$ which tells us what happens in the 'average' case. In the example we're working with, you might assign

$$\theta_0 = 0, \qquad \theta_1 = 1, \qquad \theta_2 = -1, \qquad \theta_3 = 2, \qquad \theta_4 = 1$$

which means that fan support has the biggest effect on attendance, ticket price has a negative effect, and the other two factors have a positive effect. Then you can form a score vector $Z$, defined by

$$Z = \theta_0 + \theta_1 X_1 + \cdots + \theta_4 X_4$$

which represents the overall score for that combination of factors. In the example I'm giving, the score vector works out to be $Z = 1$.

Finally, your predicted percentage $y$ for how full the stadium is is given by

$$y = \frac{1}{1 + \exp(-Z)}$$

which in the example here works out to be $y = 0.73$ (which is 73% attendance).

With this skeleton of an idea, you can now go and play with your scalings for the factors and with the parameter values $\theta$ until you find something that looks reasonable.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.