Reduce Math in Formula Algebraically: BestCost

  • B
  • Thread starter 1plus1is10
  • Start date
  • Tags
    Formula
In summary, the conversation discusses a formula for BestCost and using it to filter out values higher than 2/3 of the low range of the average. It is suggested to use an if statement in the code and the concept of a midrange is clarified. In the end, the speaker decides to sort the costs and use the 4th lowest value as the BestCost. It is also mentioned that the formula can be simplified to a weighted average form.
  • #1
1plus1is10
51
0
Is there a way to reduce the math in my formula algebraically:
BestCost = lowest+((((highest+lowest)/2)-lowest)*0.6667);

I want to use BestCost to filter out any Cost that is higher than 2/3 of the low range of the average. I hope that makes sense.

Thanks
 
Mathematics news on Phys.org
  • #2
1plus1is10 said:
Is there a way to reduce the math in my formula algebraically:
BestCost = lowest+((((highest+lowest)/2)-lowest)*0.6667);

I want to use BestCost to filter out any Cost that is higher than 2/3 of the low range of the average. I hope that makes sense.
"Filter out" implies to me that you want to discard or ignore some values. Based on your use of a semicolon at the end of your formula, I suspect that this is part of some code, possibly C or a language derived from C. If that's the case, to filter out values, you need an if statement.

What do you mean by "low range of the average?" The average (or mean) is a single number. What you're calculating in your formula with (highest + lowest)/2 is called the midrange.

It would help if you provided a reasonably small list of numbers, and showed what your calculation is supposed to do.
 
  • Like
Likes 1plus1is10
  • #3
You are very perceptive and bright - yes, it is code and after messing with it for quite some time now - I stopped to think about it. And "midrange" is exactly what I want. Unfortunately, I was getting confused in my head with median, mean, and price range. In the end, I will have to ditch my formula, and instead, simply sort my Costs to determine the correct 1/3 lowest.

Random costs after sorting: 1,2,3,4,5,6,7,8,9,10,11,12
BestCost = anything below the 4th one in the list;

Thanks for your help.
 
  • #4
Your formula uses only linear operations. You can simplify it step by step until you get something like BestCost = a*lowest+b*highest with some coefficients a and b.
If a+b=1 (which is the case here) then you calculate a weighted average of the two numbers. BestCost is then always at the same relative place in the interval from lowest to highest.
 

What is "Reduce Math in Formula Algebraically: BestCost"?

"Reduce Math in Formula Algebraically: BestCost" is a method used in algebra to simplify complex mathematical formulas by using various techniques such as the distributive property, combining like terms, and factoring.

Why is it important to reduce math in formula algebraically?

Reducing math in formula algebraically can make the formula easier to understand and work with, as well as help identify patterns and relationships between different variables. It also allows for more efficient problem solving and can help save time and effort in calculations.

What techniques are commonly used in reducing math in formula algebraically?

Some common techniques used in reducing math in formula algebraically include the distributive property, combining like terms, factoring, and using the properties of exponents and logarithms.

How do you know when a formula has been reduced algebraically?

A formula is considered to be reduced algebraically when there are no more like terms that can be combined, all parentheses have been removed, and all exponents are in their simplest form.

Can reducing math in formula algebraically change the value of the original formula?

No, reducing math in formula algebraically does not change the value of the original formula. It simply simplifies the expression in a way that makes it easier to work with, but the overall value remains the same.

Similar threads

Replies
1
Views
808
Replies
3
Views
1K
  • General Math
Replies
1
Views
1K
Replies
7
Views
1K
  • General Math
Replies
7
Views
2K
  • General Math
2
Replies
44
Views
3K
Replies
2
Views
2K
Replies
33
Views
2K
  • General Math
Replies
8
Views
807
  • General Math
Replies
2
Views
1K
Back
Top