The best Maths tutors available
Poonam
5
5 (80 reviews)
Poonam
£100
/h
Gift icon
1st lesson free!
Paolo
4.9
4.9 (85 reviews)
Paolo
£35
/h
Gift icon
1st lesson free!
Anthony
5
5 (95 reviews)
Anthony
£10
/h
Gift icon
1st lesson free!
Sehaj
4.9
4.9 (62 reviews)
Sehaj
£60
/h
Gift icon
1st lesson free!
Intasar
5
5 (73 reviews)
Intasar
£99
/h
Gift icon
1st lesson free!
Shane
4.9
4.9 (51 reviews)
Shane
£50
/h
Gift icon
1st lesson free!
Dr scott
5
5 (78 reviews)
Dr scott
£100
/h
Gift icon
1st lesson free!
Tomi
5
5 (41 reviews)
Tomi
£55
/h
Gift icon
1st lesson free!
Poonam
5
5 (80 reviews)
Poonam
£100
/h
Gift icon
1st lesson free!
Paolo
4.9
4.9 (85 reviews)
Paolo
£35
/h
Gift icon
1st lesson free!
Anthony
5
5 (95 reviews)
Anthony
£10
/h
Gift icon
1st lesson free!
Sehaj
4.9
4.9 (62 reviews)
Sehaj
£60
/h
Gift icon
1st lesson free!
Intasar
5
5 (73 reviews)
Intasar
£99
/h
Gift icon
1st lesson free!
Shane
4.9
4.9 (51 reviews)
Shane
£50
/h
Gift icon
1st lesson free!
Dr scott
5
5 (78 reviews)
Dr scott
£100
/h
Gift icon
1st lesson free!
Tomi
5
5 (41 reviews)
Tomi
£55
/h
Gift icon
1st lesson free!
Let's go

Types of Variables

A variable is defined as a characteristic about a thing, place or group that is usually measured. In statistics, there are generally two broad categories that we can use to classify variables: numerical and categorical. These categories are explained in the table below.
NumericalCategorical
DefinitionVariables which are quantitative characteristics of a thing, place or groupVariables which are qualitative characteristics of a thing, place or group
Other namesQuantitative variablesQualitative variables
ExamplesHeight, age, scoreHair colour, personality, location

Within these two general categories, there are several sub-categories that can be used to further specify what kind of variable we’re dealing with. These sub-categories are displayed in the image below. probability_theory_statistics Quantitative, or numerical, variables can be split into two distinct categories: discrete and continuous.

DiscreteContinuous
DefinitionMutually exclusive categories, typically integersCan take on infinitely many values within a range of numbers
ExampleAge in years as an integer. This could be anything from 0 to 100.Age in years as an exact measurement. This would be, for example, age in years, days, and seconds.

discrete_continuous

Quantitative, or categorical, variables can also be split into two distinct categories: nominal and ordinal.
NominalOrdinal
DefinitionA qualitative characteristic with no inherent orderA qualitative characteristic with an inherent or given order (on a scale)
ExampleHair colourSatisfaction rating

norminal_ordinal

Types of Analysis

Understanding what type of variables you have in your dataset is the first step in analysing data. It is important because it enables  you to understand what types of analysis you will be able to run. Recall that statistics is divided into two branches: inferential and descriptive. inference_descriptive There are different types of tools that you can use depending on the type of variables you are analysing. The table below summarizes the most common types of analysis you can perform.

Univariate (1 variable)Bivariate (2 variables)Multivariate (3+ variables)
NumericalMean, median, mode, standard deviation, percentilesSimple linear regression, scatterplotMultiple linear regression, ANOVA, cluster analysis
CategoricalPie chart, bar chart, frequencyContingency tableSocial network analysis, discriminant analysis
Numerical & Categorical-Bar chart, z-test or t-testLogistic regression, ANOVA

Frequency

Frequency is one of the statistics that you can use in order to analyse how often something occurs. Frequency is defined quite simply as the number of times something happens. Let’s take the following table as an example, where the count for the times someone is chose a given fruit as their favourite appears.

FruitCount
AppleIIIII IIIII II
BananaIII
OrangeIIIII
PeachIIIII III

Can you guess what the frequency for each fruit would be? It’s as simple as summing all of the counts in relation to a given fruit. This means that the frequency would be the following.

FruitCountFrequency
AppleIIIII IIIII II12
BananaIII3
OrangeIIIII5
PeachIIIII III8

Frequency typically goes hand in hand with visualizations such as bar charts or histograms. You can think about frequency as a way to translate a categorical variable into a numerical one. Because the frequency of a qualitative variable is a quantity, it can be plotted easily.

contingency

Types of Frequency

There are actually several types of frequency. The one we calculated is the simplest form of frequency. There are three more types of frequency apart from this one, although all require finding the simple frequency first.

  1. Row Frequency
  2. Column Frequency
  3. Cumulative Frequency

In order to find these frequencies, let’s elaborate on the previous example, dividing each preference of fruit by gender.

FemaleMaleOtherRow Total
Apple47112
Banana1203
Orange2125
Peach3238
Column Total1012628

In order to find the row frequency, you simply take the value in each row and divide it by the row total. The column total, on the other hand, is found by dividing each value by the column total. The image below explains this process using the first value. contingency_table The cumulative frequency, on the other hand, is simply the sum of each additional frequency. The row frequencies can be found in the table below.

FemaleMaleOtherTotal
Apple33.3%58.3%8.3%100%
Banana33.3%66.7%0.0%100%
Orange40.0%20.0%40.0%100%
Peach37.5%25.0%37.5%100%

The column frequency, on the other hand, is found in the following table.

FemaleMaleOther
Apple40.0%58.3%16.7%
Banana10.0%16.7%0.0%
Orange20.0%8.3%33.3%
Peach30.0%16.7%50.0%
Total100.0%100.0%100.0%

Contingency Table Definition

Another way to think about row and column frequencies is in terms of probability. Recall that the formula for simple probability is the number of times something can occur over the total number of possibilities. A contingency table is a way to analyse two categorical variables, like we did in the previous example tables, by analysing their frequencies. These types of frequencies translate to what is known as conditional probabilities. Conditional probabilities are probabilities between two variables that are dependent on one another. Another word for dependent is contingent, which is where the term contingency table comes into play. Why are these variables contingent on one another? Think about the way we divided up the total between the three categories of gender. The frequency we calculated is related to not just one variable, but both variables - fruit and gender. The difference with a contingency table and what we calculated in the previous tables is that the contingency table uses the total of the whole table instead of the row or column total.

Contingency Table Example

Let’s continue from the previous example dealing with fruit and gender. The total frequency, which is either the sum of all row totals or the sum of column totals, is used as our denominator for our probability formula. The first few values are calculated as examples. Notice that all values are now probabilities of the total of all frequencies.

FemaleMaleOtherRow Total
Apple4/28 = 0.1437/28 = 0.253.6%42.9%
Banana1/28 = 0.0367.1%0.0%10.7%
Orange7.1%3.6%7.1%17.9%
Peach10.7%7.1%10.7%28.6%
Column Total35.7%42.9%21.4%100.0%

Summarise with AI:

Did you like this article? Rate it!

4.00 (2 rating(s))
Loading...
Emma

Emma

I am passionate about travelling and currently live and work in Paris. I like to spend my time reading, gardening, running, learning languages and exploring new places.