Docsity

Statistics - Finance I Anno/Prof. Alessandro Recla, Appunti di Statistica

Toggle sidebar
bg1
Statistics
Examples Of Statistics Application:
§
Big data: large scale data sets with high volume velocity and variety requiring advanced
technologies for storage, processing and analysis.
§
Artificial intelligence: it is a simulation of human intelligence by machine s, enabling them to
perform tasks, reason and learning autonomously.
§
Machine learning: mathematical expression of new data, that id automatic.
o
Deep learning (it is part of machine learning):
o
Business analytics: data-driving decisions making using statistical analysis fro
business improvement.
§
Data mining: process of discovery meaningful patterns, trends, and insights from large
datasets through statistical and computational techniques.
§
Predictive intelligence: predictive maintenance uses data analysis to predict and prevent
equipment failure before they happen.
§
Business intelligence: it means putting information/ gathering, analysing, and visualising data
to gain actionable insights that supports strategic decision making
§
Dashboard: practice of presenting key data and metrics in a visual format typically through a
centraliste interfacce or dashboard.
Ø
Data visualisation: visual representation of data (ex. Graphs)
§
VOC (Voice of the Costumer): collection and analysis of costumer's feedback, preferences and
expectations to understand their needs.
THE MAIN TOPICS OF STATISTICS
The main topics of statistics are:
1.
Descriptive statistics: it is the branch of statistics that focuses on summarising and
organising data, so it is easier to understand. It uses measures like averages (mean, median,
mode), spread (range, variance, standard deviation), and visual tools such as charts and tables
to describe the main features of a dataset. Rather than making predictions, descriptive
statistics simply explains what the data shows.
2.
Probability: it is an abstract brach of statistics, it is done before the data are collected.
3.
Inferential statistics: it means that we have collected some data, and we want to generalise
those data too some cases whose date have not been recorded yet.
THE ROLE OF STATISTICS IN A DECISION-MAKING PROCESS:
The decision-making process follows a specific order:
1-
Problem: first of all, we have to choose which the problem is and to pose a question that we
need to answer.
2-
Data: according to the problem we want to solve, we have to collect some data. We can collect
data from scratch, or we can use data that we have already collected for some diSerent
reasons. This basically means that we can choose whether to use primary data (when we
collect them) or secondary data (when they have been already collected).
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Anteprima parziale del testo

Scarica Statistics - Finance I Anno/Prof. Alessandro Recla e più Appunti in PDF di Statistica solo su Docsity!

Statistics

Examples Of Statistics Application: § Big data: large scale data sets with high volume velocity and variety requiring advanced technologies for storage, processing and analysis. § Artificial intelligence : it is a simulation of human intelligence by machine s, enabling them to perform tasks, reason and learning autonomously. § Machine learning : mathematical expression of new data, that id automatic. o Deep learning (it is part of machine learning): o Business analytics : data-driving decisions making using statistical analysis fro business improvement. § Data mining : process of discovery meaningful patterns, trends, and insights from large datasets through statistical and computational techniques. § Predictive intelligence : predictive maintenance uses data analysis to predict and prevent equipment failure before they happen. § Business intelligence: it means putting information/ gathering, analysing, and visualising data to gain actionable insights that supports strategic decision making § Dashboard : practice of presenting key data and metrics in a visual format typically through a centraliste interfacce or dashboard. Ø Data visualisation : visual representation of data (ex. Graphs) § VOC (Voice of the Costumer): collection and analysis of costumer's feedback, preferences and expectations to understand their needs.

THE MAIN TOPICS OF STATISTICS

The main topics of statistics are:

  1. Descriptive statistics : it is the branch of statistics that focuses on summarising and organising data, so it is easier to understand. It uses measures like averages (mean, median, mode), spread (range, variance, standard deviation), and visual tools such as charts and tables to describe the main features of a dataset. Rather than making predictions, descriptive statistics simply explains what the data shows.
  2. Probability : it is an abstract brach of statistics, it is done before the data are collected.
  3. Inferential statistics: it means that we have collected some data, and we want to generalise those data too some cases whose date have not been recorded yet.

THE ROLE OF STATISTICS IN A DECISION-MAKING PROCESS:

The decision-making process follows a specific order: 1 - Problem: first of all, we have to choose which the problem is and to pose a question that we need to answer. 2 - Data: according to the problem we want to solve, we have to collect some data. We can collect data from scratch, or we can use data that we have already collected for some diSerent reasons. This basically means that we can choose whether to use primary data (when we collect them) or secondary data (when they have been already collected).

3 - Information: we have to transform data into information. This transformation process is done by descriptive statistics. 4 - Knowledge: we want to generalise the information we have to a wider range of cases. This generalisation process is done by inferential statistics. 5 - Decision: the answer to the initial problem. ! Many company usually start from the ‘answer / decision’ step. Tu us is strong since when we start from the solution we want to obtain, we will always find some data that confirm our thesis, however, this does not mean that it is the correct solution. In fact, we have to start from the ‘question step and collect the data, analyse them ,.., to find a decision.

DATA SOURCE

Data source s can be divided according to the time and the purpose for which they were/ are collected: Ø Primary data : those data are collected to fulfil specific research goal. Primary research involves finding out new, first-hand information. Ø Secondary data : those data are / were originally collected for other aims but are used to support our research question. Secondary research involves gathering existing information. We can divide data into:

  • Structure data
  • Unstructured data

Primary Data vs Secondary Data

Ø Primary data : those data are collected to fulfil specific research goal. Primary research involves finding out new, first-hand information Pros : o Directory relevant to the business o Up-too-date data obtained o Competitors do not have access to the findings Cons : o Time consuming o Of ten expensive o Results may be misleading if the research (sample size is too small, questions are unclear or there is interviewer basis). Ø Secondary data : those data are / were originally collected for other aims but are used to support our research question. Secondary research involves gathering existing information. Pros : o Often quick and easy to collect o A wide range of secondary data is available, especially on the internet. Cons : o Data may not be reliable or up to date o May not be totally relevant o May not be in a form that is easily interpreted and analysed.

THE STARTING POINT OF DATA ANALYSIS

§ Parameter : a summary measure that is computed or describe a characteristic of the population Ex. Mean consumption of wine § Statistic : a summary measure that is computed to describe a characteristic of the sample therefore depending not he sample used to compute it. Where: Ø Population: the totality of objects under consideration Ø Sample: it a part of the population a group of the population. In other words, a sample is a portion of the population that is selected for information collection and analysis. Therefore, we use the parameter to summarise population feature while we use statistics to summarise sample feature and then we use inference on the population from the sample.

RANDOM SAMPLING

How can I understand if the sample/result are reliable? What is important when collecting data is to collect them randomly. The random sampling is a procedure in which each parameter of the population is chosen strictly by chance, each member of the population is equally likely to be chosen and every possible sample of \n\ object is equally likely to be chosen. The resulting sample is called a random sample. The sampling process and procedure are a multitude, but all of them in a way follow randomness. v Dealing with Uncertainty Statements: § “Italians drive car: a survey shows that only 35% do not respect the speed limit” è actually, we cannot say if the people answering the survey were honest or not, in fact a survey means that people say things, and answer a question it. Therefore, it is not objected è It is unclear the moment and the duration of such event. è The statement is trying to make the readers think that 35% is a low number, because the statement says ‘ only ’ § “This is the biggest aquatic park in Europe”

è There are many ways to quantify ‘big’, we cannot say in which way it is the biggest; there are many ways to measure the same thing § “90% of our customer are satisfied” è Maybe the customers are very few, the base is important è There is selection hazard, in fact tit is the 90% of the costume that answered the survey and not the 90% of the costume è We cannot fully comprehend what satisfied means § “The shampoo makes hai up to 4 times brighter” è ‘Up to’ means that it could be also lower’, this kind of sentences are used in advertising § “The San Domenico Ski resort has a good 35 kms of ski slope!” è They want you to thing that 35 is a high number, saying ‘good’, but is it not § “The visitors have increased by 300% in the last year!” è The initial base is missing.

DATA CLASSIFICATION

By columns : The variables are written by columns. The value is called ‘ observed variable’ since we have the values of those variables. When we do not have the values, we call them ‘ random variables’ A variable is a characteristic of a statistical unit (the single element in our data set, in our row) that can assume more than one value (it cannot be constant). To be a variable it needs at least 2 existing values, a variable is something that should vary. By rows : we have statistical units, which are the element that belong to the sample or to population. The number of rows is indicated by N = population size n = sample size è We have to remember that the sample size is important, but what is pivotal the randomness.

VALUE OF THE VARIABLE AND THEIR CLASSIFICATION

The values that the variable can assume are important, and those values are called distinct values or modalities. According to the type of distinct values, I can understand what type of variable I have. There are two possible ways to classify the variables:

  • 1 st^ classification of variables : it is focused on the physical characteristics of the modalities. There are 3 diSerent types of variables: Ø Categorical variable: a variable where the possible modalities are categories (ex. The feelings, the three words). It means that the data origination can be defined as a classification. A typical categorical variable is x Ex. Gender (male/female) Ø Numerical variable: there are two subcategories: i. Numerical discrete variables: data origination is a counting process ; Consequentially, it has only integer numbers. Ex. N. of students ii. Numerical continuous variable: data origination is a measuring process. We have any possible value also with the decimals. Ex. Weight of an object

Revenues Quantitative Ratio Scale Price of a product Quantitative Ratio Scale Years Quantitative Interval Scale Kelvin Degrees Quantitative Ratio Scale Date (day of the year) Quantitative Interval scale Hour Quantitative Interval Scale GPA Quantitative Interval Scale è Satisfaction level: o It is a Quantitative Interval Scale if you have at least 1 to 7 modalities. o It is a Qualitative Ordinal variable if you have less than 7 modalities Ex. low-mid-high o It is a Qualitative nominal variable if you have 2 modalities Ex. Yes/No è Starting from a high level of richness, it is possible to reclassify it in a lower level of variable. However, it is not possible to do the opposite. Dummy Variable: It is a qualitative nominal variable that can only assume two values: 0 and 1. It is strange since we can apply a lot of quantitative methods even if it is a qualitative variable (x ex. we can compute the percentage of it) Data Visualisation It is the way to visualise the variable, and so the way to summarise the variables and the information. According to the type of data visualisation we want to do, we have to answer this question: “how many variables?”; we have to remember the lower, the better, it important to simplify. § Only one variable: univariate data visualisation § Two variables: bivariate data visualisation § More than two variables: multivariate visualisation. (It is not easy to create a variable that is putting together two diSerent variables)

Univariate Data Visualisation

We can divide Univariate Data Visualisation into two subgroups:

  1. Qualitative / categorical variables
  2. Quantitative / numerical variables v Qualitative/categorical variables: Raw data > Transformation of the raw data > Data Visualisation We cannot use directory the raw data in the data visualisation; we need the so-called frequency distribution table which is a way to summarise the data. Raw data —> Frequency Distribution —> Data Visualisation Frequency distribution table:

X fi Pi Fi X1 f1 P1 F1 (P1) X2 f2 P2 F2 (P1+P2) .. .. .. .. Xk Fx n Pk 1 Fk= 1

  • Xk : k is equal to the number of distinct values modalities. We have to remember that k , to be eSect, should be much low than n: k < n. ! If the variable is Qualitative Nominal. There is not an order to follow when summarising it, while if it is Qualitative Ordinal we have to follow the intrinsic order.
  • fi : it is the absolute frequencies or counts; therefore, it is the number of times each modality repeats in the dataset. The sum of all the Fi is equal to the number of rows, n.
  • pi : it is the relative frequency of percentages: it is simple the percentage of time each modality appears /repeats being in the dataset. Pi can be computed by making the ratio between the fi (absolute frequency) and the number of rows (n).
  • Fi : which b is the cumulated relative frequency (it makes sense only for ordinal variables ). Cumulative relative frequency, in other words, is the % of times each modality Xi assumes a value equal or lower than Xi. The cumulated relative frequency of the 1st^ statistical unit is like its p 1 , the one of the 2 nd statistical units is equal to the 1st^ p1+ the 2 nd^ p2 and so on. The last one will be always 1, the total; if not, something is wrong. Visualisation of a qualitative/categorical variable: There are two ways to visualise a quantitative/numerical variable, we have to choose only one of the two charts otherwise it would be an error: Type equation here. 1. Pie/donut Chart Ø Number of sectors = k (number of modalities) Ø Each slice is proportional to fi or pi (the frequency)

Ø Each row is my last dinners where I didn’t cook Analyse each row: Ø The first column is a qualitative variable which is nominal Ø The second column is qualitative nominal variable Ø The third columns is a qualitative ordinal variable Analyse the raw data concerning the 1st^ variable: Type of food Frequency Distribution Table: Type fi pi Fi Ethnic 3 0.3 / Fast food 4 0.4 / Pizza 3 0.3 /

Analyse the raw data concerning the 2nd^ variable: Home delivery Dummy variable – it can assume only 2 values: 1 and 0 Home Delivery fi pi Fi 0 6 0.6 / 1 4 0.4 / 10 1.0 / Analyse the raw data concerning the 3rd^ variable: Price Price fi pi Fi Low 4 0.4 F1=p Mid-low 3 0.3 F2=p1+p2 oppure F2=F1+p2 —> 0.4+0.3=0. Mid-high 2 0.2 F3=p1+p2+p3 oppure F2=F2+p3 —> =0. High 1 0. 10 1. o The Fi is important so as to calculate some other values o In any possible frequency distribution table, the last column (Fi) must be equal to 1. o Being an ordinal variable, the pie chart is not an optimal choice of representation. A better way is through the bar chart (It is not wrong to use the pie chart, but the best option remains the bar chart). Ø In this case we can use the same colour, it is not mandatory to use diSerent colours as in pie chart. Ø We put the variables at the same distance.

o Fi: cumulative function, is the Frequency F(x) is the specific variable the value can assume. The cumulative frequency is the relative frequency of the values that are equal to or lower then x (specific variable) Ex: Let’s visualize it: Stick Chart: Prof advice: on the y axes, you can both put pi and fi, but it is more eSective to put the relative frequency (pi) o It represents the Pi o The variable ‘number of cars’ is a quantitative discrete variable and being a quantitative variable, we don’t have to put all the variables at the same distance o The diSerence to the bar chart is that here the starting point is 0 and we have sticks Step chart (for cumulative frequency):

The height of each step corresponds to the percentage o Cumulative frequency means that frequencies are cumulated, so we start from 0 and it has to reach 100%. o We have to sum all the frequencies. o All the frequencies are inside a point and therefore we have diSerent steps. Ex. Of visualisation of a numerical discrete variable with many distinct values or a numerical continuous variable We need to bin the variable because in this way it can’t be visualised. The variable has to be reclassified with BINS (classes/intervals) Ø Bins with equal width In this case, the role of the analyst is quite easy: choice of the number of bins Ø Bins with arbitrary width In this case the role of the analyst is crucial and quite complex: select the size of each bin v Option 1: bins with equal width Ex. X= n of WhatsApp messages sent by a sample of 20 people on Christmas Day § The variables are numerical discrete § Sample size: 20 § Raw data: 76, 74, 86, 34, 48, 12, 48, 54, 98, 108, 64, 72, 28,52, 82, 88, 92, 54, 106, 60 7 - step process:

  1. Sort raw data in ascending order (from the lowest to the highest) – so I can see if some values are repeating 12, 28, 34, 48, 48, 52, 54, 60 , 64, 72, 74, 76, 82, 86, 88, 92, 98, 106, 108
  2. Find the range of the data (Maximum value-Minimum value) Range= Xmas-Xmin Range: 108-12=96 9
  3. Chose the number of bins/classes (K); The K is choice of the analyst: if I choose a k that is too high the result may be fragmented, if it is too low…It is pivotal to find a trade oS otherwise the result may be too wide/low. Usually k belongs to the interval between 5 and 15 In this case, since we have few data, let’s try with K=
  4. Compute the bin’s width (w) The formula to compute it is:

§ Frequency Density Ci = is the frequency density and it is the percentage of observations for each unit interval, on average. The frequency densisty is what can be used for comparisons. § Width of each BIN Wi = it important when we choose BINS with arbitrary width, however it is important to put it also in this case since it is important to calculate the Ci.

  1. Draw the histogram and the ogiva Let’s start from the histogram : the most popular graphical representation of a numerical variable Ø We have to draw some rectangles, their high is the Ci and the Wi is 20. Ø We are simplifying the things, because we are saying that the width is always constant in each bin. That it the reason why we can see that if we compute the areas of each bin and then we sum them all, we will reach 100%. This is possible by construction and thanks to the fact that we follow the assumption that the distribution is the same along the bin. Ø We have to under Line the fact that, by construction, the area pf each rectangle is equal to its Pi. è How to compute (aproximative) relative frequencies using the histogram o Fr {X> 80}: we have simply to compute the area from 80 to 100. This is and approximation because use it is case on the assumption that the distribution is the same along the Bins. Fr {X > 80} = (90-80) * 0.015 + p5= 0.15+ 0.2 =35% o Fr {X< 35} Fr {X < 35} = p1 + (35 – 30) * c2= p1 + 35-30) * 0.0075 = 0.10 + 0.0375 = 13.75% Drawing the histogram can be useful to compute these frequencies è How to interpret the histogram

We can understand the shape of the distribution. The shape is elated to the way the variable is distributed. in statistics the variables have two tails.

  1. Symmetric distribution: the two tails are similar to each other. We have an higher frequency in the central part of the variable while the extremes are going down symmetrically 2. Skewed to the right/Positively skewed: longer tail on the right; The left tail is smaller or absent and the datas are mainly of higher density/frequency on the left.
  2. Skewed to the left/Negatively skewed: longer tail on the left; The right tail is smaller or absent and the datas are mainly of an higher density/frequency on the right. Ex. In the example the histogram is skewed to the left/negatively skewed Graphical representation of Fi: The ogiva We need to understand the coordinates and link them; In fact the ogiva is the union of diSerent test that have diSerent slopes.

Ex. Datas: Ø 50 shopping malls Ø X= “distance from Milan” (in Km) Those data have already been binned; we have only to visualise them. We have to take into consideration the fact that the widths of the classes are diSerent.

  1. Compute the pi and the Fi and Wi and Ci
  2. We represent in the graphs: a. The Ci with the Histogram b. The Fi with the Ogiva è Histogram Ø The distribution is positively skewed or skewed to the right

è Ogiva Recap of univariate data visualisation: Charts Variables Pie/Donut chart Qualitative nominal (ordinal) Bar chart Qualitative ordinal (nominal) Stick chart Quantitative discrete – few distinct values Step chart Quantitative discrete – few distinct values Histogram Quantitative continuous – many distinct values Ogiva Quantitative continuous – many distinct values

Bivariate Data Visualisation

It is very used in financial systems. Time series plot It is interesting because we are creating a timing longitudinal analysis. Therefore, the same variables across the time. The variables are two: the variable we want to analyse and the time. We need: Raw data: time-related statistical unit (ex. Year, quarter, month week, day, min., sec…) From the statistical unit we can measure or count a single variable which usually is a quantitative variable. Some example s of variables are: § revenues, § prices, § orders, § GDP