Making Math Less Stressful With A Python Super-Calculator

A 2D simple regression analysis.

In a recent write-up, [David Delony] explains how he built a Wolfram Mathematica-like engine with Python.

Core to the system is SymPy for symbolic math support. [David] said being able to work with symbolic math easily has helped his understanding of calculus and linear algebra. For statistics support he includes NumPy, pandas, and SciPy. NumPy is useful for creating multidimensional arrays and supports basic descriptive statistics such as mean, median, and standard deviation; pandas is a library for operating on tabular data arranged into “DataFrames”, it can load data from spreadsheets (including Excel) and relational databases; and SciPy is a “grab bag” of operations designed for scientific computing, it includes some useful statistics operations, including common probability distributions, such as the binomial, normal, and Student’s t-distribution.

For regression analysis [David] includes statsmodels and Pingouin. If you’re not familiar with the term “regression analysis” it basically refers to the process of curve fitting. When your data is two-dimensional, with one dependent variable, the simple linear regression algorithm will generate a function that fits the data as y = mx + b, including the slope (m) and the y-intercept (b); this can be extrapolated to higher dimensional data and other types of regression.

If you have an interest in symbolic math you might enjoy learning about Mathematica And Wolfram On The Raspberry Pi.

15 thoughts on “Making Math Less Stressful With A Python Super-Calculator

      1. you jest, shirley, but programming required-purchase TI calculators got me where I am today. Which admittedly isn’t saying much, but ha.
        .
        The internet wasn’t really a thing, so transferring programs using the cable was about the only way for most “kids” to share software reasonably well. And $100 was way cheaper than a home computer to run BASIC or whatever, if you even had a home computer (I didn’t).
        It was easy to sit there “working” on the calculator bored in class after we already zipped through the work, writing programs and learning about else-if etc. I only wish we had access to all the assembler hacks that clearly existed at the time but escaped our ability to figure it out… again it was pre-internet so unless you knew a guy, it was hard/impossible.

  1. NumPy, pandas, and SciPy. Constructing blocks of trading mechanisms and strategies for markets. Tons of bots running on its shoulders, only a few survive.

Leave a Reply to PerryCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.