Category Archives: Maths

Weighted Least Squares Regression, using Excel, VBA, Alglib and Python

Least squares linear regression in Excel is easy.  That’s what the Linest and Trend functions do.  That is, they find the coefficients of a straight line (or higher dimension shape) so that the sum of the squares of the distances of … Continue reading

Posted in AlgLib, Curve fitting, Excel, Link to Python, Maths, Newton, NumPy and SciPy, UDFs, VBA | Tagged , , , , , , | Leave a comment

On the probability of frog croaks.

A recent logical puzzle from TED discussed the probability of one of two frogs being female, if we know that at least one of them is male: This puzzle is discussed (arriving at different conclusions) here: and puzzles of this … Continue reading

Posted in Excel, Maths, Newton, VBA | Tagged , , | Leave a comment

Brent’s Method and a daft engineer’s blog

Browsing links on Brent’s Method I found: Daft Engineer – Numerical Methods and Excel* which is well worth a look (plenty of stuff on statistics and Python, with the odd dash of Excel).  The link has VBA code for a … Continue reading

Posted in Excel, Maths, Newton, UDFs, VBA | Tagged , , | Leave a comment

Nearest Lookup Function

The Excel Lookup functions (including VLookup, HLookup and Match) all allow for an “exact” or “closest” match on numerical data, but the closest option has a number of problems: The data must be sorted For VLookup and HLookup the data … Continue reading

Posted in Coordinate Geometry, Excel, Maths, UDFs, VBA | Tagged , , , , , , , , | 2 Comments

xlwSciPy 1.09 – update for xlwings 0.10 and Scipy 0.18.1

The xlwSciPy spreadsheet (last presented here) has been updated for the latest version of xlwings and Scipy. The new spreadsheet can be downloaded from: xlScipy-xlw.zip including full open source code. The spreadsheet requires Python, including xlwings, Numpy, Scipy and Pandas … Continue reading

Posted in Arrays, Curve fitting, Excel, Link to Python, Maths, NumPy and SciPy, Python Pandas, UDFs, VBA | Tagged , , , , , , , , | 1 Comment

xlwSciPy 1.7

Following recent posts on xlwings 0.7.1, dictionaries, and optional arguments and xlwings – dataframes and statistics, I have added the associated functions and examples to the xlwSciPy spreadsheet, and also updated it to xlwings 0.71. The new spreadsheet can be … Continue reading

Posted in Excel, Link to Python, Maths, Newton, NumPy and SciPy, Python Pandas, UDFs, VBA | Tagged , , , , , , , , | 4 Comments

xlwings – dataframes and statistics

Another data conversion option offered by the latest xlwings release is Pandas dataframes and dataseries.  This post will look at how to pass an Excel range as a dataframe or dataseries in a User Defined Function (UDF), and some simple … Continue reading

Posted in Excel, Link to Python, Maths, Newton, Python Pandas, UDFs, VBA | Tagged , , , , , , , | 1 Comment