Statistics, regression, neural nets, PCA, plotting, and much more
Quick links: Online Statistics | Online Regression & fitting | Online PCA | Online math environment | About client-side web programming
Ever wanted to do a quick statistical test, regression, principal components analysis, or some simple descriptive statistics, but you had nothing more than your smartphone at hand? Here is a selection of web-based tools to run these analyses on any browser. Some of these tools run on the clients, which gives me the chance to put the spotlight on the power of client-side web programming.
A great resource with free tools for online statistics: SocialScienceStatistics.com
I cannot more than recommend this website, which offers online tools to compute descriptive statistics, carry out hypothesis testing, calculate p-values, and even plot some simple plots including histograms:
https://www.socscistatistics.com/
It’s not mine and I don’t get any gains for promoting it! I just showcase it because it’s super useful and handy.
Although the website promotes itself as tailored for students and researchers working with statistics in the social sciences, the tools are actually broad enough that can be applied in all disciplines dealing with data analysis. I mean, the website doesn’t use any jargon specific to the social sciences.
All the tools in this website were designed with ease of use and clarity of presentation in mind. And this was excellently achieved, IMO. Certainly, you should find it much easier to use than any ad hoc statistics or mathematics program -of course at the expense of some limitations. Importantly, the output of the tools in this website has been audited for accuracy against the output produced by regular, "established" programs.
Tools offered by SocialScienceStatistics.com
The website has three main sections: statistical calculators, which deals mainly with hypothesis testing; p-value calculators, which allow you to derive p-values from Z, t, chi-square, and Pearson (r); and descriptive statistics – averages, variance, a standard deviation calculator, and easy histogram and bar chart makers. Let me give you below some details and show you some examples:
Descriptive statistics: Given an input dataset the tools in this module return from simple average, median, mode, standard deviations, etc. to interquartile ranges, skewness and kurtosis calculators, and some quick data plotters: a quick histogram builder, where you simply enter a list of values and get back the histogram in a single click, and a quick bar chart generator where you either enter labels with associated counts or even just the source data from which the app will automatically compute frequencies and show the plot.
See these examples:
Just to show an example that is not a simple calculation of means, medians, or modes, one of the many tools for descriptive statistics calculates the coefficient of variation from a list of numbers. List all other tools in this website, you input the data on a textbox (you can just copy-paste from any regular spreadsheet program), then make some selections and click Calculate.

Another example representative of the kinds of analyses you can carry out in this website is this simple tool to calculate kurtosis and skewness:

If you prefer to inspect how your data distribute, it’s probably better to plot a histogram. This great tool from the website makes histograms very easy for you; just input the observations and click Generate.

With another tool you can easily make and compare histograms for three independent sets of data:

Both histogram tools give you not only the plots but also the computed bins and frequencies, which you can copy out to a separate program to remake the plots as you prefer. Moreover, the web tools allow you to fine-tune the ranges of the x-axis and add labels to the data and remake the plots right there.
Statistic tests: From two or more datasets, with various tools of the website you can compute ANOVA for independent or repeated measures with up to 5 treatments; also Fisher tests, Mann-Whitney, tests, Wilcoxon tests, various t-tests, and Chi-square tests; linear regression and 2-input multiple linear regression; tests for correlations including regular Pearson correlation and also Spearman correlation; calculations of p-values and confidence intervals, and various utilities for data conversion and transformation.
I show you as an example a tool I use often, to compare observations with a t-test. As in all other tools of the website, you input the data (here two sets of numbers), make some selections (here the cutoff p-value and whether the problem implies one- or two-tailed hypothesis), and click Calculate. You immediately get the results with all intermediate calculations and a conclusion on whether you’d accept or reject the hypothesis at the chosen p.

A wizard that helps you decide which statistics you need for a given question: This wizard guides you step by step through questions and based on your answers it recommends the statistical test that most likely suits the question you want to address.
Actually, most tools in the whole site are quite attentive to the kinds of data you are inputting and what questions you may have in mind. Thus it warns you on the go when the calculation you are running might not be appropriate.
Besides, the website includes tutorials on statistics about various topics on statistics through the SPSS software, including how to report results.
Regressions and data fitting
Where the website presented above falls a bit short is in regressions. However, there are some other online tools that cover this.
The first one computes linear regression, polynomial regressions up to order 15, plus exponential, logarithmic, and power regressions. Quite simple to use and it accepts x, y tables copy-pasted from regular spreadsheet programs:
This second one is limited to polynomial regressions only, but I like it because it works more interactively; in particular, you can change polynomial order up and down and get results (including graphics) in real-time, so it’s more useful to do exploratory fits:
For more general fits yet keeping it simple, the best online tool I know is this:
This website brings several built-in functions to fit (x, y) data (which can be inputted manually or also copy-pasted as shown in the instructions) to general functions including linear functions, polynomials up to order 5, and various sigmoidal, exponential, power, hyperbolic and gaussian shapes. The x and y values can be transformed before fitting, which extends the available set of quick fits. But most importantly, users can edit their own functions, which seems to work well in the tests I did. Besides, this fitting website allows weighting x and y values according to different schemes.
It takes 2 minutes to get used to the GUI. But it’s quite complete making all features available right there, and showing real-time updates of the fitting results (regression coefficients, Pearson correlations, p-values, Sum of Squared Errors, etc.) and a clear plot showing the input data (red dots) and a simulation of the input domain based on the fits (black line). See for example here how I fitted some (x, y) data to the equation y = acos(bx-1)+3:

Principal components analysis
What the websites above don’t include, and I haven’t found much online, is tools to easily explore multidimensional data. It may often happen that you have multidimensional data at hand, which is hard to separate into groups by just looking at the numbers, and is also hard to plot online.
I built this online tool with which users can run Principal Components Analysis right in their web browsers:
With it, one can easily load a table of labeled objects described by multiple variables and then with a few clicks get the plot that spreads the objects by their projections on PC1 and PC2, as well as a plot of the loadings that explain the observed projections and a plot of the eigenvalues. Besides, the tool returns the matrices produced by the singular value decomposition procedure so that users can then remake their own plots.
This is the built-in example, which you can try at http://lucianoabriata.altervista.org/jsinscience/pca/pca3.html

LALOLab, a math environment for web browsers
You may have noticed that my PCA web app above employs Singular Value Decomposition from a library called LALOLib. That is the JavaScript library counterpart of LALOLab, a package for numerical calculations in web browsers. LALOLab works like a kind of online MatLab (or Octave, or Mathcad, or whatever math programming tool you like), while LALOLib is a library that you can plug into your web apps to run complex calculations.
LALOLab and LALOLib are part of MLWeb (https://mlweb.loria.fr/lalolab/), a series of tools for numerical procedures and machine learning in the web that includes also ML.js, a library specific for machine learning in web browsers. I next briefly overview the LALOLab maths interface and the LALOLib + ML.js libraries.
Interface for maths online
LALOLab feels exactly like a numeric computing and Programming environment very much like MatLab and others, with the difference that it runs just in your web browser, not even sending data to servers as it is based entirely on client-side web programming. In fact, it uses the LALOLib JavaScript library for numeric calculations -which you can also integrate into your web apps, see next section.
LALOLab includes functions for linear algebra, statistics, flow control in programming, elementary plots, statistics, optimization, and various machine learning tools for regression, neural networks, etc. Of course it is not as powerful as stand-alone programs, but it does provide a wide range of calculations and a numeric programming environment that you can use anywhere without any instal. Wherever you have a browser, be it your phone, tablet, linux desktop or windows laptop, you’ll have this tool at hand (just like all other tools in this story -the beauty of the web!).
Here is a screenshot of me using LALOLab. You can either type command by command on the bottom left, or write scripts on the bottom right. The big light blue box will process the commands and display the outputs. You can see the syntax and formats are quite similar to (but not exactly the same as) those of MatLab.

You can access LALOLab here:
JavaScript library to run calculations in web apps
If you are into client-side web programming, you can use LALOLab’s functions right inside the JavaScript code of your web apps. You just need to load the LALOLib library with this line in your HTML:
<script src="http://mlweb.loria.fr/lalolib.js"></script>
The LALOLib library offers the same functionalities as LALOLab, but within the context of regular JavaScript inside your web page. It has a special function that transforms JavaScript arrays into its own representation of matrices. Matrices created with that function inherit all the functions and operations you can apply to matrices.
For example, you create a LALOLib matrix object from a JavaScript array P like this:
var pMatrix = array2mat(P);
And you can then operate on that matrix-keeping object with functions that look like this example for transposition:
var pMatrixT = transposeMatrix(pMatrix);
… or this example to multiply two matrices:
var H = mul(pMatrixT, qMatrix);
… or say run singular value decomposition:
var svdH = svd(H, "full");
in which case svdH contains three matrices: svdH.V, svdH.S, and svdH.U
You can also nest operations, say for example to get the determinant of the product of a matrix and the transpose of another matrix:
var d = det(mul(pMatrix, transposeMatrix(qMatrix)));
… and so on.
A further comment on client-side web programming
I don’t want to make this article too much about programming, which I will cover someday in a dedicated article, but I did want to highlight these two peer-reviewed articles I wrote about the power of client-side programming for science:
The first article reviews the best-established tools for in-browser programming including JavaScript as used in HTML5 as well as related web technologies. Through specific examples of scripts, libraries, web apps, and even full web apps, the highlights the potential of these technologies for carrying out numerical calculations, text processing and mining, retrieval and analysis of data through queries to online databases and web services, effective visualization of data including 3D visualization and even virtual and augmented reality; all of them in the browser at relatively low programming effort, with applications in cheminformatics, structural biology, biophysics, and genomics, among other molecular sciences.
This other article discusses applications of client-side web programming to science education and outreach:
Augmenting Research, Education, and Outreach with Client-Side Web Programming – PubMed
I last comment on some spin-offs of these works. The first is a bioinformatic tool built entirely to run in web browsers, much like the LALOLab environment presented above but here dedicated to explore the physicochemical reasons behind amino acid variation in proteins:
Detection and sequence/structure mapping of biophysical constraints to protein variation in…
This other spin-off is about the use web programming to produce augmented and virtual reality experiences for molecular visualization and modeling:
Building blocks for commodity augmented reality-based molecular visualization and modeling in web…
That work further evolved into a full website for chemistry education, moleculARweb:
MoleculARweb: A Web Site for Chemistry and Structural Biology Education through Interactive…
which I discuss together with other technologies in this article on this platform:
Interactive augmented reality web apps to enable immersive experiences for science education…
and also in this peer-reviewed opinion:
Democratizing interactive, immersive experiences for science education with WebXR – Nature…
I am a nature, science, technology, programming, and DIY enthusiast. Biotechnologist and chemist, in the wet lab and in computers. I write about everything that lies within my broad sphere of interests. Check out my lists for more stories. Become a Medium member to access all stories by me and other writers, and subscribe to get my new stories by email (original affiliate links of the platform).