Joins¶
Here is an example of how you can use a JOIN clause in SQL to join a table called orders with 6 other tables:
SELECT orders.*, customers.*, products.*, shippers.*, suppliers.*, categories.*
FROM orders
JOIN customers ON orders.customer_id = customers.customer_id
JOIN products ON orders.product_id = products.product_id
JOIN shippers ON orders.shipper_id = shippers.shipper_id
JOIN suppliers ON products.supplier_id =
read more
Understanding Probability With Python
Probability is a branch of mathematics that is often used to make decisions and is concerned with measuring uncertainty.
Introduction¶
Sets¶
Set data types in Python have rules similar to set in mathematics: collections are unordered, unchangeable (only removal or addition is applicable), store unique items, and are unindexed.
Experiments and Event¶
Experiment return values for observation(s), and observations have some level of uncertainty. Single possible outcome of an experiment is a sample point in a set called sample space. Set sample space stores all possible sample points for one experiment. If your experiment is a set of n sample points the full sample space is written as follows for example of coin flip:
read moreStatistical Distributions (Common ones)
Introduction¶
A probability distribution in statistics is a function that returns the possible values for a variable with different occurence rate (how often values occur). Distribution in nature and society tend to fit pattern with ocasionally occuring exceptions (isn't absence of pattern is a pattern too?).
Probability Mass Function¶
Discrete random variable has probability mass function (PMF) being a particular type of probability distribution read more
Edit Text Productively in Vim
I would like to learn vim
I am so frustrated that I don't know all the tricks. In attempt to learn more I try to list some that worked and it felt magic. I omit some that I already get used to.
Editing
After escape do the following.
R
enter …
Jump In pymc
Install¶
To simply install pymc was not enough on my computer, neither on Google Colab it worked to simply use library after !pip install
. Apparently my laptop hadn't a working fortran of C compiler- the message that I got was:
Aesara will be unable to compile C-implementations and will default to Python. Performance may be severely degraded. To remove this warning, set Aesara flags cxx to an empty string.
read more
Truchet Tiles
Truchet Tiles¶
Sebastien Truchet figured out how square tiles can be combined to form larger patterns. In the picture below you see tiles of different types to use as input for generating mosaics.
Bayes Theorem for me
Bayes Theorem¶
Introduction¶
Let us think about probability of a single event - a probability that coin turn up heads for example. Probability (1/2) is the number of outcomes that qualify as event "coin turn up heads" (1) divided by the total number of all possible outcomes (2). To calculate probability of multiple events occuring in sequence we multiply the probabilities of each event in sequence. Consider an event A occuring given that another event B (evidence that B) has occurred - probability of it is known as conditional probability. We need to calculate the probability of A conditinal on event B occuring knowing that probability of B conditional on A occuring. This is the case for applying bayesian inference. What is that? Bayesian inference is a statistical inference that uses Bayes' theorem. It is being applied to geostatistics, genetics, linguistics, image processing, machine learning and other fields.
read moreChi-Square Test
Correspondence Analysis
Correspondence Analysis¶
Introduction¶
An introduction to correspondence analysis can be found in the book "Exploratory Multivariate Analysis by Example Using R" by François Husson. It is worth reading and, along with the tutorial series on YouTube tutorial series on YouTube , it is a great source that can help make the basics of correspondence analysis clear to you.
read moreSetup a PostgreSQL db
Install PostgreSQL
I donwnloaded installer from EDB and followed instructions from PostgreSQL Setup Wizard. Wizard suggest to install some additional applications (pgAdmin etc.), let you choose directory, suggest the port number to listen 5432 or to use something else for security or if you are running multiple PostgreSQL services on …
read more