Tag: how to
-
Natural sorting
The joys of real world data… I received a file today with building floors: 1st, 2nd, 3rd, all the way to 22nd… Regular sorting quickly got me nowhere, with results that started 10th, 11th, 12th, 13th, 14th, 15th, 16th, 17th, 18th, 19th, 1st, 22nd, etc. This led to my discovery of the most marvellous natsort…
-
Matplotlib – really basic basics!
I had quite a few false starts with matplotlib this week before I got going… I should know better by now, but I still keep on thinking I can just go crashing in and extrapolate on what I know and it might work – time-WASTING behaviour! If I may offer some tips (which I trust…
-
Cheat sheet – Pandas, data manipulation
A few things I found I used over and over again the last few weeks – the basics… How it works – Pandas, data manipulation
-
Cheat sheet – Pandas, data selection
A quick cheat sheet on basic data selection functions – as an aid to memory until memory has become second nature 🙂 How it works – Pandas, data selection
-
Matplotlib colour library
You may wish for more colours – but it’s unlikely! https://matplotlib.org/examples/color/named_colors.html
-
T testing – a worked example
A simple one-sample T-test This variant on hypothesis testing is used when you have limitations, specifically: The population standard deviation (σ) is unknown and your sample size (n) is <30 The fundamentals The formula is a variant of what we’ve seen thus far, where x̄ = your sample mean, μ = a hypothesized population mean,…
-
Proportion testing
Using everything we’ve learned so far about the central limit theorem, the z-score, and hypothesis testing, we can now also perform proportion testing! There are just a few new concepts to add into the mix: The preliminary terrors – notation & terminology p = the proportion of items that falls into H0 q = the…
-
Hypothesis testing basics
A simple example of hypothesis testing is where we know what “normal” is, and we want to evaluate whether some sample conforms to our understanding of “normal”, or is so unusual that it’s indicative of an actual shift in behaviour or pattern. Make your hypothesis statement If I…(do this to an independent variable)….then (this will…
-
Preliminary terrors of statistics
The “preliminary terrors“, of course, being the notation as Silvanus P. Thompson so aptly described them :). Pronunciation μ sounds like “mew” σ sounds like “sigma” x̄ sounds like “x-bar” The population So we can think of this as the complete set of “things”, whatever the “things” are that are under consideration – for example…
-
Pandas – get “these” based on “those”
Here is a common scenario for me: I have 2 related dataframes, and I want to select only the values from the one dataframe based on criteria from the other dataframe. For example, below we have people (including country) and brands (related to the people) and we want to select “only brands related to people who…
