+ Reply to Thread
Results 1 to 8 of 8

Equation Not Producing the correct result

  1. #1
    Forum Contributor
    Join Date
    11-23-2013
    Location
    La Crosse, Wi
    MS-Off Ver
    Excel 2010
    Posts
    105

    Equation Not Producing the correct result

    I have been trying to figure out my mistake on the following equation...

    Ft = ((-24.5 * ((0.667 * (wind * 8/5)) + 4.8)) + 2111) * (-4.8 - ((Temp-32) * 5/9)) ^ -1.668

    On a previous post (http://www.excelforum.com/excel-gene...750)...someone suggested

    =SUM(-24.5*((0.667*B9*8/5)+4.8),2111)*SUM(-4.8,-(B8-32)*5/9)^-1.668

    If I plug in the following...

    wind = 5
    Temp = -10

    I am supposed to get the following answer 31

    However this equation which looks right to me is giving me an answer of 14.29

    I found someone who is calculating this formula using the following in a java script... FBT2 = ((-24.5 * ((0.667 * ((FBTwind * 8) / 5)) + 4.8)) + 2111) * (Math.pow(-4.8 - (((FBTtemp - 32) * 5) / 9),-1.668)) and this one does produce the correct results. They are using this at ... http://weather.stadhaugh.com/Frostbite2.html

    They look like they should do the same thing, so not sure why I am getting different results. I have attached a spreadsheet along with a table of various answers to help.
    Attached Files Attached Files
    Last edited by boynejs; 02-12-2016 at 03:59 AM.

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Equation Not Producing the correct result

    It seems that it is not an Excel issue, it is the equation where the problem is occurring.
    Can you manually show us the calculations for how 31 is reached from wind = 5 and temp = -10 so we implement it in excel.
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Forum Contributor
    Join Date
    11-23-2013
    Location
    La Crosse, Wi
    MS-Off Ver
    Excel 2010
    Posts
    105

    Re: Equation Not Producing the correct result

    Quote Originally Posted by sourabhg98 View Post
    It seems that it is not an Excel issue, it is the equation where the problem is occurring.
    Can you manually show us the calculations for how 31 is reached from wind = 5 and temp = -10 so we implement it in excel.
    I know it is my EXCEL equation is the issue. I have been trying to figure out why 31 is the answer. I have spent several hours trying to figure out my mistake and I just do not see it. However I know the java script equation is producing the correct result. It is nearly identical to my result.

  4. #4
    Registered User
    Join Date
    03-30-2014
    Location
    Pittsburgh,PA
    MS-Off Ver
    Office 2010, Home Student 2013
    Posts
    62

    Re: Equation Not Producing the correct result

    The javascript equation you give also returns 14.29. Here's the Excel equivalent, as closely as possible:
    Please Login or Register  to view this content.
    The time to frostbite is usually taken from a lookup table. The values in the lookup table were extrapolated from experiments using twelve volunteers, see http://www.srh.noaa.gov/ssd/html/windchil.htm

    First, a Wind Chill Temperature is calculated using Fahrenheit degrees and wind speed in miles per hour.

    Wind Chill = 35.74 + (0.6215 * Temp) - (35.75 * Wind^0.16) + (0.4275 * Temp * Wind^0.16)

    A temperature of -10 degrees F and a wind speed of 5 mph gives a Wind Chill Temperature of -22 degrees F. From the table at the link given above, the time to frostbite is just over 30 minutes.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Equation Not Producing the correct result

    This kind of thing gets frustrating. Debugging strategies I tend to use for something like this:

    1) Break the computation up into smaller bites. There are a lot of parentheses in the current formulation, and it is easy to get parentheses out of place. For example, it appears that the original equation is based on temperatures in C and wind speeds in km/hr, so parts of the current formulation are performing the unit conversions. I would tend to pull the unit conversions out and do those separately and make sure that the unit conversions are correct.

    2) Research the equation to make sure that it is applicable. Are you certain the values in the table were calculated from the equation, or are the tabulated values the experimental result and the equation is a "best fit" of the tabulated values? Other limitations on the equation? For example, this page (http://schools.cbe.ab.ca/b274/pdfs/Wind%20chill.pdf ) claims that the proposed equation is only valid for wind speeds above 15 kph and times below 15 min. If I restrict your equation to those inputs, it appears to match the tabulated values pretty well, though not exactly. This suggests to me that the tabulated values are not from the equation, but the equation is an empirical fit of the table.

    I'm not quite satisfied with this, either, but it might suggest a direction for your research.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Equation Not Producing the correct result

    I suppose I have been intrigued by the question.

    This is more debugging stadhaugh's javascript, but I found this little bit interesting.

    If I put -10 F and 5 mph in (units to F), then it calculates 31 minutes.
    If I put -23.33333 C and 8.047 kph (units to C), then it calculates 22 minutes.

    Like you and thisoldman, I get 14.3 minutes from the equation. I, too, cannot see how one gets 31 (or 22) minutes from the inputs you are using.
    Last edited by MrShorty; 02-12-2016 at 02:19 PM.

  7. #7
    Registered User
    Join Date
    03-30-2014
    Location
    Pittsburgh,PA
    MS-Off Ver
    Office 2010, Home Student 2013
    Posts
    62

    Re: Equation Not Producing the correct result

    The stadbaugh site is using lookup tables. When you view the page source, there are two arrays, minutes to frostbite for Fahrenheit and mph and another one for Celsius and kph. The equation giving the 14.29 minutes is in a dead section of code – the user should never see results from that code.

    Here's a spreadsheet that mimics the working code from that site. The IF() functions in the work book are not my style but I wanted to follow the source logic reasonably closely.

    File: minutes_to_frostbite.xlsx

  8. #8
    Registered User
    Join Date
    03-30-2014
    Location
    Pittsburgh,PA
    MS-Off Ver
    Office 2010, Home Student 2013
    Posts
    62

    Re: Equation Not Producing the correct result

    Looks like my error trapping in the spreadsheet in my last post fails. Certainly not a spreadsheet I'd put into a serious user's hands. Sorry about that goof-up.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 11-27-2015, 11:12 AM
  2. My Macro is not producing the correct output. Help please!
    By ioecho in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2015, 12:54 PM
  3. [SOLVED] Percenages in Powerpivot Grand total is not producing correct result
    By rv02 in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-21-2015, 12:32 PM
  4. [SOLVED] IF formula with mulitiple calculations not producing correct results
    By Wombat123123 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-15-2015, 12:49 PM
  5. [SOLVED] IF formula using dates not producing correct result
    By Snelms in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-14-2014, 03:48 PM
  6. Replies: 1
    Last Post: 09-17-2012, 09:35 AM
  7. SUM function not producing correct result
    By angiebro in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-28-2010, 06:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1