title: MATLAB: Solving series of equations to systematically adjust probability estimates
body: <p>I am trying to write MATLAB code that takes in estimated probabilities <code>x</code> and <code>y</code> and maps them on to an adjusted set of probabilities <code>p</code> and <code>q</code>.</p>
  
  <p>Usually the input probabilities <code>x</code> and <code>y</code> won't add up to 1, and so the point of the code is to adjust the probabilities so that they do add up to 1. </p>
  
  <p>Here's an example where  <code>x + y = 1.03</code></p>
  
  <pre><code>syms n p q x y
  eqn1 = x == 0.7813;
  eqn2 = y == 0.2487;
  eqn3 = p^n == x;
  eqn4 = q^n == y;
  eqn5 = log(x)./log(p) == log(y)./log(q);
  eqn6 = x^(1/n) == p;
  eqn7 = y^(1/n) == q;
  eqn8 = p + q == 1;
  
  sol = solve([eqn1, eqn2, eqn3, eqn4, eqn5, eqn6, eqn7, eqn8], [n p q x y])
  </code></pre>
  
  <p>The value <code>n</code> is applied to both x and y, and it deliberately has the effect of 'pushing down' low probability estimates more so than high probability ones. </p>
  
  <p>I know that in the example above the answer should be <code>n≈0.946139, p≈0.7704, q≈0.2297</code> but haven't been able to write any code that produces such an output. </p>
  
  <p>The code above produces an empty struct. I have also tried <code>vpasolve</code> which also did not work. I am unsure if my solutions are failing because I've misspecified the problem or because I'm using the wrong function type in MATLAB.</p>