The audio recording isn’t great with functions yet, and there will be a lot of those. listener’s discretion is advised.

Also, the time estimate is a little off, I’d estimate it takes around 17 minutes to read, including breaks & pauses. Not including breaks & pauses, I’d say about 9 minutes.

Also, this makes little to no sense on its own, so read This one first, if you haven’t already. It’ll take around 8 minutes.

Also, it has come to my attention that this does not include the discrete case, and the probability density functions are a bit wonky, as the method currently provided is optimized purely for comparing abstract functions. At the moment, the function treats “PDF”*s as though there is a uniformly randomly distributed input (x), and a non-uniform output (fi(x)). The “PDF”* of fi(x) is equal to f′i(f−1i(x)) for the continuous function fi(x), (f−1i(x) being the inverse function of fi(x).). I am working to fix this.

WARNING: Only read this if you want to, or are skeptical about whether it works, and need to be sure.

Conceptualizing the Problem:

The problem at hand is to understand the expected value when we “roll” a number of functions a certain number of times. A “roll” in this context refers to generating an input in a function’s domain. For each function, f1(x),f2(x),andf3(x)^{[1]}

, confined to specific input ranges, denoted by

Minimum input

Maximum input

#times we “roll” the input

Function

a1

b1

c1

f1(x)

a2

b2

c2

f2(x)

a3

b3

c3

f3(x)

. The coefficients c1,c2,c3 represent the number of times we evaluate each respective function.

The sgn Function:

Before diving deep, let’s clarify the sgn(x) function. The sgn(x) or “signum” function is simple but powerful. It returns:

−1 if x<0

0 if x=0

1 if x>0.

So, sgn(x−fi(xh)) checks if x is larger than our function’s output. By adding 1 and dividing by 2, the original function’s outcomes of −1, 0, and 1 transform to 0, 0.5, and 1 respectively. Essentially, this is turning the signum function into a binary (0 or 1) indicator for whether fi(xh)<x.

Functions fa(x),fb(x),andfc(x).

These functions integrate the modified sgn function over the domain of their respective functions fi. Essentially, they measure the proportion (and, by extension, probability) of the function(fi)’s domain where its value is less than x.

fi(x)=(∫bhah(sgn(x−fh(xh))+1)2dxh)|bh−ah|

Small break

Congratulations if you’ve made it this far! As a reward, here’s a Monty Python video that I found funny.

This is optional and works best if you try not to worry about what you’ve read so far. If you think you would, I suggest you re-read it, or read the recap.

Quick recap

we randomly generate inputs for functions and use the largest value.

To get the expected value of this, we multiply each output by the probability that it’s the highest using the function above, denoted as fi, and then “add” all of those outputs to get the expected value.

Bringing it Together in fd

Understanding the Mechanism of fd:

fd calculates the expected value for each function f1(x),f2(x),andf3(x) individually and then multiplies them by how many times we “roll” them. ( c1,c2,andc3.)

This integral gives the expected value of f1(x) weighted by the probability that f1(x) has the highest output among the three functions for all valid inputs x.

Role of the Exponents:

The exponents in the functions fa,fb,andfc serve a crucial role. Given that each of these functions essentially returns a probability, raising them to their respective exponents is the equivalent of multiplying the probabilities.

fa(f1(x))(c1−1+∣∣c1−1∣∣2): Represents the probability that f1(x) is more than the value of f1(xa), c1−1 times. (c1 is the number of times we “roll” an input for the function f1(x)). The reason for the −1 is because we don’t need to calculate the chances of f1(x) being higher than f1(x). The reason for the +|c1−1|2is because it outputs c1−1 for all values where c1 is more than or equal to 1, and 0 for all values less than 1. We do this because we don’t want to get a negative exponent, as this may result in dividing by 0, which is undefined.

fb(f1(x))c2 and fc(f1(x))c3 Represent the probabilities that f1(x) surpasses f2(xb) and f3(xc) respectively, the necessary number of times.

Enhancing your understanding

Probability of Being the Highest:

By multiplying these terms, we calculate the joint probability that f1(x) is the highest output among the three functions a specific number of times as denoted by the coefficients, the same as you would iff2(x) were the same as a hypothetical f4(x), f5(x), …^{[1]}

Weighting by the Function Value:

Finally, we multiply this probability by the function’s value f1(x) to weigh it by the actual outcome of the function, the same way you would always multiply probability by value.

Summing Over the Domain:

By integrating over the domain of f1(x), we capture the aggregated effect across all possible inputs.

Applying the Coefficients ci:

After obtaining the expected contribution of each function, we multiply each result by their respective coefficient c1, c2, or c3. These coefficients account for the number of times we evaluate each respective function in our simulation.

We can then use the same logic for f2 and f3.

If you have any questions, I suggest you ask Chat-GPT or me. If you have any suggestions as to how I can make this clearer, or a better way of finding the expected value of the best option, or any wording that could be done differently, tell me. (ONLY if you want). No pressure.

If there’s anything incorrect, please tell me.

Congratulations! You made it to the end!

as a special reward, have another funny video. You deserve it.

## Why It Works

## Quick Sidenote

The audio recording isn’t great with functions yet, and there will be a lot of those. listener’s discretion is advised.

Also, the time estimate is a little off, I’d estimate it takes around 17 minutes to read, including breaks & pauses. Not including breaks & pauses, I’d say about 9 minutes.

Also, this makes little to no sense on its own, so read

Thisone first, if you haven’t already. It’ll take around 8 minutes.Also, it has come to my attention that this does not include the discrete case, and the probability density functions are a bit wonky, as the method currently provided is optimized purely for comparing abstract functions. At the moment, the function treats “PDF”*s as though there is a uniformly randomly distributed input (x), and a non-uniform output (fi(x)). The “PDF”* of fi(x) is equal to f′i(f−1i(x)) for the continuous function fi(x), (f−1i(x) being the inverse function of fi(x).). I am working to fix this.

WARNING: Only read this if you want to, or are skeptical about whether it works, and need to be sure.

Conceptualizing the Problem:The problem at hand is to understand the expected value when we “roll” a number of functions

a certain number of times.A “roll” in this context refers to generating an input in a function’s domain. For each function, f1(x),f2(x),andf3(x)^{[1]}, confined to specific input ranges, denoted by

. The coefficients c1,c2,c3 represent the number of times we evaluate each respective function.

The sgn Function:Before diving deep, let’s clarify the sgn(x) function. The sgn(

x) or “signum” function is simple but powerful. It returns:−1 if x<0

0 if x=0

1 if

x>0.So, sgn(x−fi(xh)) checks if x is larger than our function’s output. By adding 1 and dividing by 2, the original function’s outcomes of −1, 0, and 1 transform to 0, 0.5, and 1 respectively. Essentially, this is turning the signum function into a binary (0 or 1) indicator for whether fi(xh)<x.

Functionsfa(x),fb(x),andfc(x).These functions integrate the modified sgn function over the domain of their respective functions fi. Essentially, they measure the proportion (and, by extension, probability) of the function(fi)’s domain where its value is less than

fi(x)=(∫bhah(sgn(x−fh(xh))+1)2dxh)|bh−ah|x.## Small break

Congratulations if you’ve made it this far! As a reward, here’s a Monty Python video that I found funny.

This is optional and works best if you try not to worry about what you’ve read so far. If you think you would, I suggest you re-read it, or read the recap.

## Quick recap

we randomly generate inputs for functions and use the largest value.

To get the expected value of this, we multiply each

outputby the probability that it’s the highest using the function above, denoted as fi, and then “add” all ofthose outputsto get the expected value.Bringing it Together infdUnderstanding the Mechanism offd:fd calculates the expected value for each function f1(x),f2(x),andf3(x) individually and then multiplies them by how many times we “roll” them. ( c1,c2,andc3.)

Component Analysis:The full function isfd=(∫b1a1(fa(f1(x))(c1−1+∣∣c1−1∣∣2)fb(f1(x))c2fc(f1(x))c3f1(x))dx)c1+(∫b2a2(fa(f2(x))c1fb(f2(x))(c2−1+∣∣c2−1∣∣2)fc(f2(x))c3f2(x))dx)c2+(∫b3a3(fa(f3(x))(c1)fb(f3(x))c2fc(f3(x))(c3−1+∣∣c3−1∣∣2)f3(x))dx)c3

Let’s focus on the first term:

(∫b1a1(fa(f1(x))(c1−1+∣∣c1−1∣∣2)fb(f1(x))c2fc(f1(x))c3f1(x))dx)c1

This integral gives the expected value of f1(x) weighted by the probability that f1(x) has the highest output among the three functions for all valid inputs

x.Role of the Exponents:The exponents in the functions fa,fb,andfc serve a crucial role. Given that each of these functions essentially returns a probability, raising them to their respective exponents is the equivalent of multiplying the probabilities.

fa(f1(x))(c1−1+∣∣c1−1∣∣2): Represents the probability that f1(x) is more than the value of f1(xa), c1−1 times. (c1 is the number of times we “roll” an input for the function f1(x)). The reason for the −1 is because we don’t need to calculate the chances of f1(x) being higher than f1(x). The reason for the +|c1−1|2is because it outputs c1−1 for all values where c1 is more than or equal to 1, and 0 for all values less than 1. We do this because we don’t want to get a negative exponent, as this may result in dividing by 0, which is undefined.

fb(f1(x))c2 and fc(f1(x))c3 Represent the probabilities that f1(x) surpasses f2(xb) and f3(xc) respectively, the necessary number of times.

## Enhancing your understanding

Probability of Being the Highest:By multiplying these terms, we calculate the joint probability that f1(x) is the highest output among the three functions a specific number of times as denoted by the coefficients, the same as you would iff2(x) were the same as a hypothetical f4(x), f5(x), …

^{[1]}Weighting by the Function Value:Finally, we multiply this probability by the function’s value f1(x) to weigh it by the actual outcome of the function, the same way you would always multiply probability by value.

Summing Over the Domain:By integrating over the domain of f1(x), we capture the aggregated effect across all possible inputs.

Applying the Coefficientsci:After obtaining the expected contribution of each function, we multiply each result by their respective coefficient c1, c2, or c3. These coefficients account for the number of times we evaluate each respective function in our simulation.

We can then use the same logic for f2 and f3.

If you have any questions, I suggest you ask Chat-GPT or me. If you have any suggestions as to how I can make this clearer, or a better way of finding the expected value of the best option, or any wording that could be done differently, tell me. (

ONLY if you want). No pressure.If there’s anything incorrect, please tell me.## Congratulations! You made it to the end!

as a special reward, have another funny video. You deserve it.

3 Functions is an arbitrary quantity. you can use as many as you want.

(Here’s how)