I wan't to compute some trigonometric formulas.
Is better to simplify as much as I could my formulas ?
Examples:
Ex. 1: u = atan2(cos(pi/4), sin(pi/4)*cos(0))/(2*pi)
Ex. 2: u = atan((pi/4)/cos(pi/4))/(2*pi)
These examples give me two different outputs, although in theory, both of them return the same result.
So, what is the best way to work such formulas ?
Related
This is the question, but I can not find a way on how to tackle it...
I know that if they are independent then:
p(X, Y|Z) = p(X|Z)p(Y|Z)
p(X|Y, Z) = p(X|Z)
p(Y|X, Z) = p(Y|Z)
Does someone have some tips on how to tackle this?
You are to check if P(x=a,y=b|z=c)=P(x=a|z=c)P(y=b|z=c) for every combination of a,b,c equal to 0 or 1. For example, P(x=1,y=1|z=0)=0.49 but also P(x=1|z=0)P(y=1|z=0)=(P(x=1,y=0|z=0)+P(x=1,y=1|z=0))*(P(x=0,y=1|z=0)+P(x=1,y=1|z=0))=(0.49+0.21)(0.49+0.21)=0.49.
There are seven cases to go but once you found that P(x=a,y=b|z=c)\not=P(x=a|z=c)P(y=b|z=c) for some a,b,c you are done, in which case the answer is NO (x,y are not conditionally independent w.r.t. z). Otherwise, the answer is YES.
All the required values can be read from the table.
I am not sure if there is a cleaner way to do this, but I am wondering if it is possible to repeat an index match with multiple different look-up values?
=INDEX(Financials!$B$10:$XFD$10,MATCH('Model'!$G$2,Financials!$B$102:$XFD$102,0))
+INDEX(Financials!$B$10:$XFD$10,MATCH('Model'!$G$3,Financials!$B$102:$XFD$102,0))
+INDEX(Financials!$B$10:$XFD$10,MATCH('Model'!$G$4,Financials!$B$102:$XFD$102,0))
+INDEX(Financials!$B$10:$XFD$10,MATCH('Model'!$G$5,Financials!$B$102:$XFD$102,0))
As you can see, I am doing 4 different index match formulas on the same arrays and only changing the look-up value. Perhaps there is a way to insert an array as the look-up value. Any thoughts welcome! Thanks!
Variations:
Several methods will achieve this, depending on scope/intent (screenshot below refers, here is a shared workbook fyi):
1] =SUMPRODUCT(SUMIFS($B$10:$CB$10,$B$11:$CB$11,$G$2:$G$5))
Courtesy #ScottCraner, this 'does the job'; albeit in the spirit of creating a 'cleaner way', I prefer the following which has greater parsimony / simplicity (i.e. less 'expensive' re time/computation, easier to audit/communicate etc.) & achieves same objective/result:
2a] =SUM(B10:CB10*(G2:G5=$B$11:$CB$11))
Perhaps more intuitive is the following, slight variation to above:
2b] =SUM(IF($B$11:$CB$11=$G$2:$G$5,B10:CB10,""))
You'll struggle with the index function if you wish to sum all values for which there is a much (by the sounds of it, you do, in which case the function would take the form of a filter which would require slightly more complexity in relation to 2, but would on par with 1, assuming the Office 365 pre-requisite for filter is not an issue):
3] =SUM(FILTER(B10:CB10,ISNUMBER(MATCH($B$11:$CB$11,$G$2:$G$5,0))))
Of course, if you really want to reproduce what you have but in a 'cleaner' way, you would deploy the following:
4] =SUM(INDEX($G$13:$CG$13,MATCH(F8:F11,$G$14:$CG$14,0)))
Of course, this abstracts from being able to deal with multiple common values.
How do I concatenate several conditions in Excel in the IF statement? I want to compare values in 2 different columns but mith more than 1 condition!. IF (condition 1,condition2 ; truevalue;) i dont know the sintaxis for this!
If you use purely native worksheet functions, you have to nest your if statements. It's far from ideal:
=if(condition1,X,if(condition2,Y,if(condition3,Z,A)))
Is like saying:
if (condition1) then X
else if (condition2) then Y
else if (condition3) then Z
else A
You can also define a User Defined Function (UDF) using VBA, but that has some disadvantages associated with it. It adds a lack of transparency for those who don't use VBA. It also makes your workbook a little more "suspicious" since it has embedded macros, which is a turn off for some.
Depending on how complex your conditions are, a UDF still may be the way to go.
Post some real pseudo-code to help identify which side you fall on.
I need help with the following formula for Excel.
It's not working, the only feedback I'm getting is #VALUE! outcome.
What I'm trying to do is simply:
F5≥-8 = Big,
-3≤F5≤-7.99999= Bigger,
F5≥-2.9999999 = "Blank" <--- No outcome display required
=IF((F5)>=-8, "Big"),IF((F5)>=-3, "Bigger"), IF((F5)<=-1,",")
=IF(F5>=-8, "Big",IF(F5>=-3, "Bigger", IF(F5<=-1,"Biggest","")))
I share the same thought with TotsieMae, you are absolutely right mate. The formula above is by syntax correct but logically not.
Anyway, if the formula involve too many IF functions, then it might be worth to consider an alternate form:
=IFERROR(VLOOKUP(F5,{-8,"Big";-3,"Bigger";-1,"Biggest"},2,TRUE),"Big")
Let me share the problem, where I am trying to decide the winner list comparing multiple parameters:
First of all, I need to compare the fault points. The less you have the better place you get. If the fault points are equal, then I need to compare the time. Comparing the time, the faster you performed the greater place you get (green column represents the right result).
I have used this formula:
=IF(AA16="";"";COUNTIF($Z$16:$Z$24;"<"&Z16)+1+SUMPRODUCT(--($Z$16:$Z$24=Z16);--($AA$16:$AA$24>AA16)))
However, I get a wrong comparison for the time parameter. My guess is that it is either a small issue I am having or the formula itself is completely wrong.
Thanks in advance.
Use this formula instead:
=RANK(Z16,Z$16:Z$24,1)+SUMPRODUCT((Z$16:Z$24=Z16)*(AA$16:AA$24<AA16))
See image for reference:
Looks like this might be helpful. They have an example related to breaking ties that I think will work for your scenario.
Excel Functions: Rank