**Teens4Teens Statistic**

Every book has people (other than its authors) without whom it would not have been written. We would like to thank everyone that inspired us to take up this challenge, gave us a helping hand during the hard times we had while writing, showed us the new ways of dealing with problems and opened our eyes to new possibilities. Particularly we would like to express our gratitude to Statistics Poland for being an everlasting source of motivation. In short, we would like to thank everyone that has made this book happen.

As we live in this beautiful world, we would never publish without having high-profile backers. Piotr Wachowiak - Rector of the Warsaw School of Economics, supported our project both financially and organisationally.

The whole new part we dedicate to our reviewers. Their profound observations, helpful suggestions and problem-solving tips based on their experience enabled us to significantly improve both the technical side and clarity of this book. Nevertheless, there were others that provided us professional, though unofficial, remarks that made a huge impact - we would like to thank Michal Benčik from the National Bank of Slovakia for his detail focus that enabled him to find logical scratches even inside the codes, Ali Polat from Ankara Yildirim Beyazit University in Turkey for pointing out that the content may be useful, Maciej Szulc for a completely new perspective on what's easy and what's not, Andrzej Torój from SGH for pointing out possible directions, Marek Gruszczyński from SGH as the one man we never met but learned so much from through his econometric textbooks and Anna Szelągowska along with other participants of the Auditing, Accounting, Banking 2019 conference for suggestions and comments. As well as all of the academic staff, we received help from the business sector. Aleksander Kacprzyk and Anna Woźniak provided the project with great strategy comments, Tomasz Śmigielski, gave us his agreement to use the tool he developed for fractal creation while Da niel Olkowski, head of our lovely Computer Science Research Group, is to be thanked especially for our algorithmic education and showing us the connections between the school and business. The early version of the manuscript was circulated to a few interested teachers whose subjects we touched. Thus, prior versions of this book substantially benefited from Beata Danielak, Jolanta Drogoń, Magdalena Gradek, Wojciech Martys, Marek Pawłowski, Monika Sadowska, Katarzyna Szypuła, Joanna Śmigielska and Beata Wanago - we are grateful for your knowledge and support.

We also received institutional support both from our schools and other institutions. We would like to thank authorities of XIV Stanisław Staszic's High School, Regina Lewkowicz, Agnieszka Potocka and se cretary staff the same as headmaster of XCIV gen. Stanisław Maczek's High School, Anna Pawłowska for time and copyright management. Credit shall also be given to Staszic's pedagogues, Agnieszka TokarskaSerwa, Jolanta Dacko and Julia Schmidt, and the parents' council. We shall also bring up here our unofficial coaches - staff, librarians and trainers in the Palace of Youth in Warsaw. Moreover, we would like to underline the role of Staszic's librarians: Dorota Nosowska and Jan Pachulski and give them special credit for being with us the whole time and listening to our never-ending philosophical reflections. The other group we would like to thank are our friends who bravely beta tested our work, especially Marek Morawski. The sacrifices of the 3D class also shall be noticed, as a few of them were preparing for a math test from this book. We also shall mention Michał Motyl, for the project which notably influenced Chapter 1, so Data Visualisation.

As for individual acknowledgements: Mikołaj would like to thank Sylwester Błaszczuk, who made his love for probability grow stronger and taught him to present complex problems simply. He greatly appreciates Edward Stachowski and Jerzy Konarski for the effort of putting his knowledge in this area together at school and Mateusz Rapicki for the joyous substantive support while writing the book. Igor K. would like to thank Bartłomiej Wilczyński for providing him with rock-solid language foundations, ease of expression and support. Igor S. would like to thank the teachers and pupils at Elementary School no. 221 along with Anastasiya Derkachova for opening the math games. Richard would like to mention here the support he acquired from aunts Mola, Kasia, Beata and both Natalies as well as his grandfathers. He would also like to express his gratefulness towards his geography teachers - Marek and Piotr Dąbrowski. They had along with his secondary school math teacher, Agnieszka Potocka, taught him that the mastery is not complicating simple things, but simplifying the complicated ones. Both Richard and Igor S. express their gratitude to Elżbieta Lont and Elżbieta Trendak for laying down the fundamentals. Finally, Małgorzata would like to express her gratitude to her math teacher

Last, but not least, we need to give special credit to our publisher - it must have been really hard for staff that usually work with scientists to babysit a bunch of teenagers. Thus, we would like to mainly thank Ewa Łukasiewicz, our invaluable editor, for her exceptional organisation skills and perfectionism. For their professional approach and patience, we would like to mention here also this book's graphic editors, Aleksandra Musiał and Lilianna Kaleta. Chapters 3 and 8 be nefited greatly from Ewa Spirydowicz's linguistic corrections. Irrespective of all the support and comments we have received, all potential uncorrected errors in the text remain our responsibility.

Authors

[[[separator]]]

** **

**Acknowledgements**

Contents

**Introduction **

*Why you should read this book? *

*Why Teens4teens? *

*How are you going to learn?*

**Chapters Comprehension **

*Chapter 1: The data visualisation *

*Chapter 2: Measures of location and central tendency *

*Chapter 3: Measures of dispersion *

*Chapter 4: Probability *

*Chapter 5: Tricky tools in probability *

*Chapter 6: Probability distributions *

*Chapter 7: Sample *

*Chapter 8: Regression & Correlation*

**Basic knowledge **

*The statistics *

*Useful symbols & formulas *

*Types of data - qualitative and quantitative *

*What is the population? *

*Population vs samples *

*How to create an unbiased sample?*

**The data visualisation **

*Introduction *

*SMITHY! What's going on in my company?! *

*Tables *

*Graphs/Charts *

*Pie chart *

*Bar Chart *

*Scatter plot *

*Line graph *

*Igor survived! *

*Igor is the boss! *

*Summarise *

*Quiz *

*Exercises *

*Measures of location and central tendency*

**Measures of location and central tendency **

*Introduction *

*Before we begin *

*Arithmetic mean (average) *

*Weighted arithmetic mean *

*Geometric mean (average) *

*Harmonic mean *

*RMS - Root mean square *

*Relations between the averages *

*Median *

*Mode *

*Quantiles *

*Percentiles in grouped data *

*Different results (mock GPA comparison) *

*Use cases *

*Recapitulation *

*Quiz *

*Exercises *

*Measures of dispersion *

**Measures of dispersion **

*Introduction *

*Minimum & Maximum *

*Range *

*Making money is hard *

*Now what *

*Why Variance won't let us down as the mean has? *

*Then what can we do? *

*But what is the point of counting it if it's squared? *

*Few words about Variance *

*Let's take a closer look at its use when finding a good machine for producing nails *

*The results of those long calculations *

*But all those numbers still don't give us any real information, do they? *

*Is there anything we can do about it? *

*What we have just discovered is a standard deviation *

*Remember! *

*"Challenge Accepted" ~ RTD BX3 "Naily" *

*Looking for a shortcut *

*What does it mean for the director? *

*The completely new challenge *

*There is no space! *

*This is the magic of the variance! *

*Summary *

*Quiz *

*Exercises *

*Probability*

**Probability **

*Introduction *

*Sets and Venn diagrams *

*Permutations, k-permutations and k-tuples *

*Combinations and the binomial coefficient *

*Definition & characteristics of probability *

*Stochastic trees *

*Interesting fact - almost impossible events *

*Conditional probability *

*Total probability *

*Bayes' theorem *

*Are our experiments independent? *

*What model to use? - examples in problems *

*Let's put it all together *

*Quiz *

*Exercises *

*Tricky tools in probability*

**Tricky tools in probability **

*Introduction *

*Bernoulli trials *

*Expected value *

*Linear transition of expected value *

*Adding random variables *

*Welcome back, variance! *

*Variance also can make transitions *

*Calculating variance and standard deviation - C++ will do it for us! *

**Why does probability work? - law of large numbers *

*Final Bonus: the code of our simulation *

*And that's all it takes *

*Quiz *

*Exercises *

*Probability distributions*

**Probability distributions **

*Introduction *

*Binomial distribution *

*How to make the calculations more humane - binomial distribution approximations *

*Be cautious - the binomial distribution has no memory! *

*Geometrie distribution *

*Poisson distribution *

*More about the "magie e" *

*Let's finish our example *

*The parameters - A will tell you everything! *

*Continuous distributions and the probability density function (PDF) *

*Uniform distribution - a brief extension *

*Cumulative distribution function (CDF) *

*Let's welcome the normal distribution! *

*Expected value and variance - you decide *

*Standardising the normal distribution *

*Normal distribution in normal life *

*When not to use the normal distribution? *

*That's all the stuff! *

*Quiz *

*Exercises *

*Sample *

* *

**Sample **

*Introduction *

*The origins *

*Population variance & sample variance *

*Standard deviation *

*Standardisation *

*Standard error *

*Summary *

*Quiz *

*Exercises *

*Regression & Correlation*

**Regression & Correlation **

*Introduction *

*Houston, we have a problem! *

*Data visualisation *

*The line of best fit *

*Let's finally use the formulas! *

*But what about accuracy? *

*Correlation *

*So, what is the final solution to the squirrel problem? *

*The squirrels return! *

*Your honour, I've got an objection!*

*(Few words of explanation) *

*Summary *

*Quiz *

*Exercises*

**Quiz Solutions **

Literature

**Simple introduction to C++ **

*Basic knowledge *

*Variable types *

*Common input and output methods *

*Conditions *

*Arrays and vectors: similarities and differences *

*Loops *

*Functions *

*Standard Template Library (STL) functions *

*Algorithms*

**Who are those guys? **

### Opis

### Wstęp

Every book has people (other than its authors) without whom it would not have been written. We would like to thank everyone that inspired us to take up this challenge, gave us a helping hand during the hard times we had while writing, showed us the new ways of dealing with problems and opened our eyes to new possibilities. Particularly we would like to express our gratitude to Statistics Poland for being an everlasting source of motivation. In short, we would like to thank everyone that has made this book happen.

As we live in this beautiful world, we would never publish without having high-profile backers. Piotr Wachowiak - Rector of the Warsaw School of Economics, supported our project both financially and organisationally.

The whole new part we dedicate to our reviewers. Their profound observations, helpful suggestions and problem-solving tips based on their experience enabled us to significantly improve both the technical side and clarity of this book. Nevertheless, there were others that provided us professional, though unofficial, remarks that made a huge impact - we would like to thank Michal Benčik from the National Bank of Slovakia for his detail focus that enabled him to find logical scratches even inside the codes, Ali Polat from Ankara Yildirim Beyazit University in Turkey for pointing out that the content may be useful, Maciej Szulc for a completely new perspective on what's easy and what's not, Andrzej Torój from SGH for pointing out possible directions, Marek Gruszczyński from SGH as the one man we never met but learned so much from through his econometric textbooks and Anna Szelągowska along with other participants of the Auditing, Accounting, Banking 2019 conference for suggestions and comments. As well as all of the academic staff, we received help from the business sector. Aleksander Kacprzyk and Anna Woźniak provided the project with great strategy comments, Tomasz Śmigielski, gave us his agreement to use the tool he developed for fractal creation while Da niel Olkowski, head of our lovely Computer Science Research Group, is to be thanked especially for our algorithmic education and showing us the connections between the school and business. The early version of the manuscript was circulated to a few interested teachers whose subjects we touched. Thus, prior versions of this book substantially benefited from Beata Danielak, Jolanta Drogoń, Magdalena Gradek, Wojciech Martys, Marek Pawłowski, Monika Sadowska, Katarzyna Szypuła, Joanna Śmigielska and Beata Wanago - we are grateful for your knowledge and support.

We also received institutional support both from our schools and other institutions. We would like to thank authorities of XIV Stanisław Staszic's High School, Regina Lewkowicz, Agnieszka Potocka and se cretary staff the same as headmaster of XCIV gen. Stanisław Maczek's High School, Anna Pawłowska for time and copyright management. Credit shall also be given to Staszic's pedagogues, Agnieszka TokarskaSerwa, Jolanta Dacko and Julia Schmidt, and the parents' council. We shall also bring up here our unofficial coaches - staff, librarians and trainers in the Palace of Youth in Warsaw. Moreover, we would like to underline the role of Staszic's librarians: Dorota Nosowska and Jan Pachulski and give them special credit for being with us the whole time and listening to our never-ending philosophical reflections. The other group we would like to thank are our friends who bravely beta tested our work, especially Marek Morawski. The sacrifices of the 3D class also shall be noticed, as a few of them were preparing for a math test from this book. We also shall mention Michał Motyl, for the project which notably influenced Chapter 1, so Data Visualisation.

As for individual acknowledgements: Mikołaj would like to thank Sylwester Błaszczuk, who made his love for probability grow stronger and taught him to present complex problems simply. He greatly appreciates Edward Stachowski and Jerzy Konarski for the effort of putting his knowledge in this area together at school and Mateusz Rapicki for the joyous substantive support while writing the book. Igor K. would like to thank Bartłomiej Wilczyński for providing him with rock-solid language foundations, ease of expression and support. Igor S. would like to thank the teachers and pupils at Elementary School no. 221 along with Anastasiya Derkachova for opening the math games. Richard would like to mention here the support he acquired from aunts Mola, Kasia, Beata and both Natalies as well as his grandfathers. He would also like to express his gratefulness towards his geography teachers - Marek and Piotr Dąbrowski. They had along with his secondary school math teacher, Agnieszka Potocka, taught him that the mastery is not complicating simple things, but simplifying the complicated ones. Both Richard and Igor S. express their gratitude to Elżbieta Lont and Elżbieta Trendak for laying down the fundamentals. Finally, Małgorzata would like to express her gratitude to her math teacher

Last, but not least, we need to give special credit to our publisher - it must have been really hard for staff that usually work with scientists to babysit a bunch of teenagers. Thus, we would like to mainly thank Ewa Łukasiewicz, our invaluable editor, for her exceptional organisation skills and perfectionism. For their professional approach and patience, we would like to mention here also this book's graphic editors, Aleksandra Musiał and Lilianna Kaleta. Chapters 3 and 8 be nefited greatly from Ewa Spirydowicz's linguistic corrections. Irrespective of all the support and comments we have received, all potential uncorrected errors in the text remain our responsibility.

Authors

### Spis treści

** **

**Acknowledgements**

Contents

**Introduction **

*Why you should read this book? *

*Why Teens4teens? *

*How are you going to learn?*

**Chapters Comprehension **

*Chapter 1: The data visualisation *

*Chapter 2: Measures of location and central tendency *

*Chapter 3: Measures of dispersion *

*Chapter 4: Probability *

*Chapter 5: Tricky tools in probability *

*Chapter 6: Probability distributions *

*Chapter 7: Sample *

*Chapter 8: Regression & Correlation*

**Basic knowledge **

*The statistics *

*Useful symbols & formulas *

*Types of data - qualitative and quantitative *

*What is the population? *

*Population vs samples *

*How to create an unbiased sample?*

**The data visualisation **

*Introduction *

*SMITHY! What's going on in my company?! *

*Tables *

*Graphs/Charts *

*Pie chart *

*Bar Chart *

*Scatter plot *

*Line graph *

*Igor survived! *

*Igor is the boss! *

*Summarise *

*Quiz *

*Exercises *

*Measures of location and central tendency*

**Measures of location and central tendency **

*Introduction *

*Before we begin *

*Arithmetic mean (average) *

*Weighted arithmetic mean *

*Geometric mean (average) *

*Harmonic mean *

*RMS - Root mean square *

*Relations between the averages *

*Median *

*Mode *

*Quantiles *

*Percentiles in grouped data *

*Different results (mock GPA comparison) *

*Use cases *

*Recapitulation *

*Quiz *

*Exercises *

*Measures of dispersion *

**Measures of dispersion **

*Introduction *

*Minimum & Maximum *

*Range *

*Making money is hard *

*Now what *

*Why Variance won't let us down as the mean has? *

*Then what can we do? *

*But what is the point of counting it if it's squared? *

*Few words about Variance *

*Let's take a closer look at its use when finding a good machine for producing nails *

*The results of those long calculations *

*But all those numbers still don't give us any real information, do they? *

*Is there anything we can do about it? *

*What we have just discovered is a standard deviation *

*Remember! *

*"Challenge Accepted" ~ RTD BX3 "Naily" *

*Looking for a shortcut *

*What does it mean for the director? *

*The completely new challenge *

*There is no space! *

*This is the magic of the variance! *

*Summary *

*Quiz *

*Exercises *

*Probability*

**Probability **

*Introduction *

*Sets and Venn diagrams *

*Permutations, k-permutations and k-tuples *

*Combinations and the binomial coefficient *

*Definition & characteristics of probability *

*Stochastic trees *

*Interesting fact - almost impossible events *

*Conditional probability *

*Total probability *

*Bayes' theorem *

*Are our experiments independent? *

*What model to use? - examples in problems *

*Let's put it all together *

*Quiz *

*Exercises *

*Tricky tools in probability*

**Tricky tools in probability **

*Introduction *

*Bernoulli trials *

*Expected value *

*Linear transition of expected value *

*Adding random variables *

*Welcome back, variance! *

*Variance also can make transitions *

*Calculating variance and standard deviation - C++ will do it for us! *

**Why does probability work? - law of large numbers *

*Final Bonus: the code of our simulation *

*And that's all it takes *

*Quiz *

*Exercises *

*Probability distributions*

**Probability distributions **

*Introduction *

*Binomial distribution *

*How to make the calculations more humane - binomial distribution approximations *

*Be cautious - the binomial distribution has no memory! *

*Geometrie distribution *

*Poisson distribution *

*More about the "magie e" *

*Let's finish our example *

*The parameters - A will tell you everything! *

*Continuous distributions and the probability density function (PDF) *

*Uniform distribution - a brief extension *

*Cumulative distribution function (CDF) *

*Let's welcome the normal distribution! *

*Expected value and variance - you decide *

*Standardising the normal distribution *

*Normal distribution in normal life *

*When not to use the normal distribution? *

*That's all the stuff! *

*Quiz *

*Exercises *

*Sample *

* *

**Sample **

*Introduction *

*The origins *

*Population variance & sample variance *

*Standard deviation *

*Standardisation *

*Standard error *

*Summary *

*Quiz *

*Exercises *

*Regression & Correlation*

**Regression & Correlation **

*Introduction *

*Houston, we have a problem! *

*Data visualisation *

*The line of best fit *

*Let's finally use the formulas! *

*But what about accuracy? *

*Correlation *

*So, what is the final solution to the squirrel problem? *

*The squirrels return! *

*Your honour, I've got an objection!*

*(Few words of explanation) *

*Summary *

*Quiz *

*Exercises*

**Quiz Solutions **

Literature

**Simple introduction to C++ **

*Basic knowledge *

*Variable types *

*Common input and output methods *

*Conditions *

*Arrays and vectors: similarities and differences *

*Loops *

*Functions *

*Standard Template Library (STL) functions *

*Algorithms*

**Who are those guys? **

### Opinie

Every book has people (other than its authors) without whom it would not have been written. We would like to thank everyone that inspired us to take up this challenge, gave us a helping hand during the hard times we had while writing, showed us the new ways of dealing with problems and opened our eyes to new possibilities. Particularly we would like to express our gratitude to Statistics Poland for being an everlasting source of motivation. In short, we would like to thank everyone that has made this book happen.

As we live in this beautiful world, we would never publish without having high-profile backers. Piotr Wachowiak - Rector of the Warsaw School of Economics, supported our project both financially and organisationally.

The whole new part we dedicate to our reviewers. Their profound observations, helpful suggestions and problem-solving tips based on their experience enabled us to significantly improve both the technical side and clarity of this book. Nevertheless, there were others that provided us professional, though unofficial, remarks that made a huge impact - we would like to thank Michal Benčik from the National Bank of Slovakia for his detail focus that enabled him to find logical scratches even inside the codes, Ali Polat from Ankara Yildirim Beyazit University in Turkey for pointing out that the content may be useful, Maciej Szulc for a completely new perspective on what's easy and what's not, Andrzej Torój from SGH for pointing out possible directions, Marek Gruszczyński from SGH as the one man we never met but learned so much from through his econometric textbooks and Anna Szelągowska along with other participants of the Auditing, Accounting, Banking 2019 conference for suggestions and comments. As well as all of the academic staff, we received help from the business sector. Aleksander Kacprzyk and Anna Woźniak provided the project with great strategy comments, Tomasz Śmigielski, gave us his agreement to use the tool he developed for fractal creation while Da niel Olkowski, head of our lovely Computer Science Research Group, is to be thanked especially for our algorithmic education and showing us the connections between the school and business. The early version of the manuscript was circulated to a few interested teachers whose subjects we touched. Thus, prior versions of this book substantially benefited from Beata Danielak, Jolanta Drogoń, Magdalena Gradek, Wojciech Martys, Marek Pawłowski, Monika Sadowska, Katarzyna Szypuła, Joanna Śmigielska and Beata Wanago - we are grateful for your knowledge and support.

We also received institutional support both from our schools and other institutions. We would like to thank authorities of XIV Stanisław Staszic's High School, Regina Lewkowicz, Agnieszka Potocka and se cretary staff the same as headmaster of XCIV gen. Stanisław Maczek's High School, Anna Pawłowska for time and copyright management. Credit shall also be given to Staszic's pedagogues, Agnieszka TokarskaSerwa, Jolanta Dacko and Julia Schmidt, and the parents' council. We shall also bring up here our unofficial coaches - staff, librarians and trainers in the Palace of Youth in Warsaw. Moreover, we would like to underline the role of Staszic's librarians: Dorota Nosowska and Jan Pachulski and give them special credit for being with us the whole time and listening to our never-ending philosophical reflections. The other group we would like to thank are our friends who bravely beta tested our work, especially Marek Morawski. The sacrifices of the 3D class also shall be noticed, as a few of them were preparing for a math test from this book. We also shall mention Michał Motyl, for the project which notably influenced Chapter 1, so Data Visualisation.

As for individual acknowledgements: Mikołaj would like to thank Sylwester Błaszczuk, who made his love for probability grow stronger and taught him to present complex problems simply. He greatly appreciates Edward Stachowski and Jerzy Konarski for the effort of putting his knowledge in this area together at school and Mateusz Rapicki for the joyous substantive support while writing the book. Igor K. would like to thank Bartłomiej Wilczyński for providing him with rock-solid language foundations, ease of expression and support. Igor S. would like to thank the teachers and pupils at Elementary School no. 221 along with Anastasiya Derkachova for opening the math games. Richard would like to mention here the support he acquired from aunts Mola, Kasia, Beata and both Natalies as well as his grandfathers. He would also like to express his gratefulness towards his geography teachers - Marek and Piotr Dąbrowski. They had along with his secondary school math teacher, Agnieszka Potocka, taught him that the mastery is not complicating simple things, but simplifying the complicated ones. Both Richard and Igor S. express their gratitude to Elżbieta Lont and Elżbieta Trendak for laying down the fundamentals. Finally, Małgorzata would like to express her gratitude to her math teacher

Last, but not least, we need to give special credit to our publisher - it must have been really hard for staff that usually work with scientists to babysit a bunch of teenagers. Thus, we would like to mainly thank Ewa Łukasiewicz, our invaluable editor, for her exceptional organisation skills and perfectionism. For their professional approach and patience, we would like to mention here also this book's graphic editors, Aleksandra Musiał and Lilianna Kaleta. Chapters 3 and 8 be nefited greatly from Ewa Spirydowicz's linguistic corrections. Irrespective of all the support and comments we have received, all potential uncorrected errors in the text remain our responsibility.

Authors

** **

**Acknowledgements**

Contents

**Introduction **

*Why you should read this book? *

*Why Teens4teens? *

*How are you going to learn?*

**Chapters Comprehension **

*Chapter 1: The data visualisation *

*Chapter 2: Measures of location and central tendency *

*Chapter 3: Measures of dispersion *

*Chapter 4: Probability *

*Chapter 5: Tricky tools in probability *

*Chapter 6: Probability distributions *

*Chapter 7: Sample *

*Chapter 8: Regression & Correlation*

**Basic knowledge **

*The statistics *

*Useful symbols & formulas *

*Types of data - qualitative and quantitative *

*What is the population? *

*Population vs samples *

*How to create an unbiased sample?*

**The data visualisation **

*Introduction *

*SMITHY! What's going on in my company?! *

*Tables *

*Graphs/Charts *

*Pie chart *

*Bar Chart *

*Scatter plot *

*Line graph *

*Igor survived! *

*Igor is the boss! *

*Summarise *

*Quiz *

*Exercises *

*Measures of location and central tendency*

**Measures of location and central tendency **

*Introduction *

*Before we begin *

*Arithmetic mean (average) *

*Weighted arithmetic mean *

*Geometric mean (average) *

*Harmonic mean *

*RMS - Root mean square *

*Relations between the averages *

*Median *

*Mode *

*Quantiles *

*Percentiles in grouped data *

*Different results (mock GPA comparison) *

*Use cases *

*Recapitulation *

*Quiz *

*Exercises *

*Measures of dispersion *

**Measures of dispersion **

*Introduction *

*Minimum & Maximum *

*Range *

*Making money is hard *

*Now what *

*Why Variance won't let us down as the mean has? *

*Then what can we do? *

*But what is the point of counting it if it's squared? *

*Few words about Variance *

*Let's take a closer look at its use when finding a good machine for producing nails *

*The results of those long calculations *

*But all those numbers still don't give us any real information, do they? *

*Is there anything we can do about it? *

*What we have just discovered is a standard deviation *

*Remember! *

*"Challenge Accepted" ~ RTD BX3 "Naily" *

*Looking for a shortcut *

*What does it mean for the director? *

*The completely new challenge *

*There is no space! *

*This is the magic of the variance! *

*Summary *

*Quiz *

*Exercises *

*Probability*

**Probability **

*Introduction *

*Sets and Venn diagrams *

*Permutations, k-permutations and k-tuples *

*Combinations and the binomial coefficient *

*Definition & characteristics of probability *

*Stochastic trees *

*Interesting fact - almost impossible events *

*Conditional probability *

*Total probability *

*Bayes' theorem *

*Are our experiments independent? *

*What model to use? - examples in problems *

*Let's put it all together *

*Quiz *

*Exercises *

*Tricky tools in probability*

**Tricky tools in probability **

*Introduction *

*Bernoulli trials *

*Expected value *

*Linear transition of expected value *

*Adding random variables *

*Welcome back, variance! *

*Variance also can make transitions *

*Calculating variance and standard deviation - C++ will do it for us! *

**Why does probability work? - law of large numbers *

*Final Bonus: the code of our simulation *

*And that's all it takes *

*Quiz *

*Exercises *

*Probability distributions*

**Probability distributions **

*Introduction *

*Binomial distribution *

*How to make the calculations more humane - binomial distribution approximations *

*Be cautious - the binomial distribution has no memory! *

*Geometrie distribution *

*Poisson distribution *

*More about the "magie e" *

*Let's finish our example *

*The parameters - A will tell you everything! *

*Continuous distributions and the probability density function (PDF) *

*Uniform distribution - a brief extension *

*Cumulative distribution function (CDF) *

*Let's welcome the normal distribution! *

*Expected value and variance - you decide *

*Standardising the normal distribution *

*Normal distribution in normal life *

*When not to use the normal distribution? *

*That's all the stuff! *

*Quiz *

*Exercises *

*Sample *

* *

**Sample **

*Introduction *

*The origins *

*Population variance & sample variance *

*Standard deviation *

*Standardisation *

*Standard error *

*Summary *

*Quiz *

*Exercises *

*Regression & Correlation*

**Regression & Correlation **

*Introduction *

*Houston, we have a problem! *

*Data visualisation *

*The line of best fit *

*Let's finally use the formulas! *

*But what about accuracy? *

*Correlation *

*So, what is the final solution to the squirrel problem? *

*The squirrels return! *

*Your honour, I've got an objection!*

*(Few words of explanation) *

*Summary *

*Quiz *

*Exercises*

**Quiz Solutions **

Literature

**Simple introduction to C++ **

*Basic knowledge *

*Variable types *

*Common input and output methods *

*Conditions *

*Arrays and vectors: similarities and differences *

*Loops *

*Functions *

*Standard Template Library (STL) functions *

*Algorithms*

**Who are those guys? **