## Betting Formula on Betcha
\begin{align}
\\
B (w_i,t_i) = \beta_{1}e^{-\beta_{2} t_i} \frac{w_i}{\sum^{n}_{k=1}w_k} \sum^{m}_{k=1}l_j 
\\
\\
\end{align}
where $w_i$ = money bet by ith person in the winner side  
      $t_i$ = time when ith person place the bet ( $t_i \in [0,1] \ \forall i={1,2,...}$ )   
      $l_j$ = money bet by jth person in the loser side  
the coefficient $\beta_2$ is determined by the duration between the creation and the expiry date of bet        


```python
import numpy as np
import matplotlib.pyplot as plt

t = np.linspace(0,1)

plt.style.use("seaborn-whitegrid")
palette = plt.get_cmap("Spectral")
ax1 =plt.subplot(111)
ax1.set_xticks([])

for b2 in [0.1,0.5,1,2,5,10]:
    ax1.plot(t,np.exp(-b2*t),color=palette(0.5/b+0.6),label = b2)
ax1.legend(title = "different "r"$\beta_2$"" values") 
plt.yticks(np.arange(0, 1, 0.1))
plt.xticks(np.arange(0, 1, 0.1))
plt.ylabel(r"$e^{-\beta_{2} t}$")
plt.xlabel("t - time")
```

\begin{align}
\\
\sum^{n}_{i=1}B(w_i,t_i) = \sum^{m}_{k=1}l_j
\\
\end{align}
The sum of the money paid to the winners is equal to the Loser Pot,  
We can then use the bootstrapping method to calculate $\beta_{1}$. ( $\beta_{1}>1$ )   
Hence deducing the money obtained by individuals in the winner side.

For example: Noel, Hailey, Yoon, Matthew, Natalie and some other participants are betting on the winner of the chainhack.  
Noel, Hailey and Yoon have betted on Batcha to win, and turns out Betcha did win.  
So they are now rewarded by sharing the Loser Pot of £50.  
The judges have set $\beta_1 = 1$.  
Lets say,   
**Noel** has bet on Betcha at t = 0 for £5,  
**Hailey** for £5 at t = 0.1 and  
**Yoon** for bet £10 at t = 0.1  
then we get 


```python
50/(12.5+12.5*np.exp(-0.1)+25*np.exp(-0.7))
```




    1.3802584273885596



$\beta_1$ = 1.3802584273885596


```python
print(b1*12.5,b1*12.5*np.exp(-0.1),b1*25*np.exp(-0.7))
```

    17.253230342356996 15.611368395757978 17.135401261885026


**Noel** wins £17.253230342356996 (and she will get her £5 back)  
**Hailey** wins £15.611368395757978 and  
**Yoon** wins £17.135401261885026


```python

```

13153cf2c601821e467052d7ead3dea631d94b1a
ipynb
Jupyter Notebook
betting formula.ipynb
Chainhack-Betcha/betcha
853281361310e07e2dcb4fbc5f5059b15a3e2ac5
MIT
2018-11-21T12:11:50.000Z
2018-11-21T12:11:50.000Z
betting formula.ipynb
Chainhack-Betcha/betcha
853281361310e07e2dcb4fbc5f5059b15a3e2ac5
MIT
betting formula.ipynb
Chainhack-Betcha/betcha
853281361310e07e2dcb4fbc5f5059b15a3e2ac5
MIT
Qwen/Qwen-72B
1. YES
2. YES