Prezentace na téma: "STATISTICKÁ ANALÝZA DAT Daniel Svozil Laboratoř informatiky a chemie, FCHT Vojtěch Spiwok, ÚBM, FPBT."— Transkript prezentace:
STATISTICKÁ ANALÝZA DAT Daniel Svozil Laboratoř informatiky a chemie, FCHT Vojtěch Spiwok, ÚBM, FPBT
Informace přednášky – základy, opáčko, cvičení – R Další literatura D. J. Rumsey, Statistics for Dummies, 2011 D. J. Rumsey, Intermediate Statistics for Dummies, 2007 zápočet, zkouška – bude oznámeno
Valuing houses SIZE [ft 2 ]COST [$] How much money should you expect to pay for ft 2 house? $ Same question now with ft 2 ? $
Valuing houses SIZE [ft 2 ]COST [$] How much money should you expect to pay for ft 2 house? $ 21 is just a half between 18 and 24.
What a statistician does? a) Look at data b) Program computers c) Run statistics software d) Drink beer
Linear relationship SIZE [ft 2 ]COST [$] Is there a fixed amount per square foot? No What if I change to 1 300? What is the answer now? Yes
Scatter plots (bodový graf) Please, take a pen and a paper and draw a scatter plot of these data. SIZE [ft 2 ]COST [$] SIZE PRICE
Scatter plots SIZE [ft 2 ]COST [$] Is there a fixed price per square foot? No
Scatter plots SIZE [ft 2 ]COST [$]$/ft What do you think, is the data linear? Let’s make a scatter plot. Surprisingly, the data is linear, even if there is no fixed price per square foot! PRICE = AA x SIZE + BB PRICE = 30 x SIZE
Scatter plots SIZE [ft 2 ]COST [$] Draw scatterplot and tell me if these data are linear (i.e., do they lie in a line?). outliers
Bar chart SIZE [ft 2 ]COST [$] Warm up. Are these data linear? No How much to pay for a ft 2 house? Just simply interpolate Do you have trust in this number?
Bar chart Take your data and pull them together.
Bar chart SIZE [ft 2 ]COST [$]
Bar chart Much finer representation of the data Bar chart allows you to understand global trends Statistician uses cumulative tools (such as bar graph) to gain the understanding of the underlying data.
Histograms Special case of bar chart. Bar chart looks at 2D data, histogram to 1D data. That is the main difference
Age distribution Draw a histogram at the paper with the bins by 10 years (i.e , 11-20, …)
Věková pyramida věková pyramida (strom života) grafické znázornění věkové struktury obyvatelstva source:
Histogram Now I will collect heights of all of you in this room. Use Interactive Histogram Applet: interval, bin
Histogram – Body fat In Interactive Histogram Applet – choose „Body fat % in 252 men“ dataset. Find reasonable bin size Answer following questions. No matter of bin size what is always true? Most scores fall around 20%. The shape is roughly symmetrical. Most scores fall in the middle of distribution. There are more scores between 15 and 25 than between 35 and 50. There are more scores between 0 and 10 than between 18 and 24. Relatively more men have a body fat above 35% or below 5%.
Histogram – Income distribution United States Census Bureau – IncomeNumber of houses
Histogram – Income distribution This is an example of a (positively) skewed distribution (zprava zešikmené rozdělení). This distribution is not symmetrical. Most incomes fall to the left of the distribution.
Pie charts koláčový graf elections Party A – 50% Party B – 50% Party A – votes Party B – votes
Pie charts Party A – Party B – Party C – Party D – Please, draw the pie chart A: 4/12 B: 2/12 C: 1/12 D: 2/12
Bar chart and scatter plot Which scatter plot corresponds to this bar chart?
Pie chart to histogram Which histogram looks like it cames from the same data?