Message Boards Message Boards

What value of x splits the area under the curve in half?

Posted 1 year ago

How do I calculate at what point on the x axis half the area under the curve is to the right of x, and half to the left?

10 Replies
Posted 1 year ago

is there a good color pattern for emphasizing a specified region on the z-axis for tries?

Maybe you could use Mesh ?

triesPlot[nrOfTries_]:=Plot3D[
  Log[1-certainty]/Log[failure],{certainty,0,1},{failure,0.0001,1},
  PlotRange->{0,20},AxesLabel->{"risk","failure","tries"},
  ColorFunction->Function[ColorData["NeonColors"][Log[1-#1]/Log[#2]]],
  Mesh->{{nrOfTries}},MeshFunctions->{#3&},MeshStyle->{Green,Thick},
  ClippingStyle->None
]

triesPlot[10]
POSTED BY: Hans Milton
In[11]:= Integrate[Log[x]/Log[17/20], {x, 0, x2}]
    Solve[% == 1/2 (% /. x2 -> 1), x2]
    % // N

    Out[11]= (x2 - x2 Log[x2])/Log[20/17]

During the evaluation of In[11]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.

Out[12]= {{x2 -> -(1/(2 ProductLog[-(1/(2 E))]))}, {x2 -> -(1/(
    2 ProductLog[-1, -(1/(2 E))]))}}

Out[13]= {{x2 -> 2.15554}, {x2 -> 0.186682}}

Basically, the curve is a scaled version of -Log[x].

In[22]:= Integrate[-Log[x], {x, 0, x2}]
Solve[% == 1/2 (% /. x2 -> 1), x2]
% // N

Out[22]= x2 - x2 Log[x2]

During the evaluation of In[22]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.

Out[23]= {{x2 -> -(1/(2 ProductLog[-(1/(2 E))]))}, {x2 -> -(1/(
    2 ProductLog[-1, -(1/(2 E))]))}}

Out[24]= {{x2 -> 2.15554}, {x2 -> 0.186682}}
POSTED BY: Robert Nowak

So here's tries as a function of risk and failure; is there a good color pattern for emphasizing a specified region on the z-axis for tries?

Posted 1 year ago

Two ways.
Using NSolve

f[x_] := Integrate[Log[u]/Log[0.85], {u, 0.0001, x}]
NSolve[2*f[x] == f[1] && 0 < x < 1, x]

ProbabilityDistribution with InverseCDF gives the same result

dist = ProbabilityDistribution[Log[x]/Log[0.85], {x, 0.0001, 1}, Method -> "Normalize"];
InverseCDF[dist, 1/2]
POSTED BY: Hans Milton

We could set some arbitrary limit to the approach to zero; maybe four digits of precision, so 0.0001

This would not really help if the area indeed would be infinite - which is not the case.

POSTED BY: Robert Nowak

The methods below also produce the answer 0.1867, and use the technique of selecting a point arbitrarily close to zero.

Nobody questioned that this works.

POSTED BY: Robert Nowak

In this example, the area under the curve is infinite. Is there some minimum value for risk?

POSTED BY: Rohit Namjoshi
POSTED BY: Robert Nowak
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract