# Probability of winning a game from raw data.

I have a dataset made of couples $(n_i,v_i)$ where $n_i$ denotes the number of times a game has been played, and $v_i$ the number of victories at the $i-$th day.

What is the best way to evaluate the probability $P$ of winning the game? (We can assume that winning the game does not depend on time).

My first thought is to evaluate $P$ as the total number of victories over the number of games, i.e. $$P = \frac{\sum_{i=1}^t v_i}{\sum_{i=1}^t n_i}$$

I then had the doubt though that I could evaluate $p_i = v_i / n_i$ and define $P$ as the mean of the individual probabilities: $$P = \frac{1}{t} \sum_{i=1}^t p_i$$.

Somehow I feel this second approach is wrong, but can't entirely understand why.

How would you evaluate $P$ and why? Can you give me some links explaining how to evaluate reliable statistics?

-

## 1 Answer

The answer may depend on whart you know beforehand about that probability $p$. What we can says, is: If the probability is $p$ then the probability of observing $v=\sum v_i$ victories within $n=\sum n_i$ games is $${n\choose v}p^v(1-p^{n-v})$$ and this expression is maximal when $p=\frac v n$. Thus if we have no a priori knowledga about $p$ (i.e. consider each value $\in[0,1]$ equally likely), then $p=\frac vn$ is the best guess.

You can also do this on a day.by.day basis, but then your adjustment after day $i$ must take into account that you do have some a priori knowledge. You need to apply Bayes theory and this will in the end lead to exactly the same result.

-

Thanks Hagen, but I can't really follow your reasoning (it is a long time since I applied probability last time). Can you please send me some reference? Why would maximizing p be the best guess? Anyway yes, I assume that p is uniform in [0,1]. I think this is quite standard job for statisticians, and I am looking at the standard way to do this. Also I don't understand how a priori knowledge would influence the result, since $p_i$ doesn't depend on previous times... – Luca Cerone Oct 6 '12 at 12:11
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 19, "mathjax_display_tex": 3, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9634770750999451, "perplexity_flag": "head"}