Statistics Lecture Notes PDF
Document Details
Uploaded by UncomplicatedRomanArt5405
Joseph Trigiante
Tags
Summary
These lecture notes cover various statistical concepts, including descriptive statistics and inferential statistics. Examples are used to illustrate t-tests and ANOVA, along with the procedures for using them in Excel.
Full Transcript
STATISTICS LS4003 Joseph Trigiante PREVIOUSLY… In the last lecture we Completed Descriptive Statistics with sample and population Introduced general concepts of Inferential Statistics Continuous...
STATISTICS LS4003 Joseph Trigiante PREVIOUSLY… In the last lecture we Completed Descriptive Statistics with sample and population Introduced general concepts of Inferential Statistics Continuous Covered the first of 3 cases-Correlation (Continuous vs Continuous) Continuous TODAY… In this lecture A couple more general concepts for Inferential Statistics Continuous The second case: Continuous vs Categorical Categorical T-test and ANOVA A COUPLE MORE GENERAL THINGS… TYPES OF ERRORS In the last lecture we saw the ultimate goal of statistics, to tell a signal from random noise, can be expressed as choosing H0 or H1. We saw that if p 0.05 Remission at 12 months Remission at 12 months 40 25 35 20 30 % Remission % Remission 25 15 20 15 10 10 5 5 0 0 Control Drug 1 Drug 2 Drug 3 Control Drug 1 Drug 2 Drug 3 At least one of them different They’re all the same ANOVA BUT, ANOVA will not tell you which condition(s) is different 40 40 35 35 30 30 % Remission % Remission 25 25 20 20 15 15 10 10 5 5 0 Control Drug 1 Drug 2 Drug 3 0 Control Drug 1 Drug 2 Drug 3 p-value < 0.05 40 40 35 35 30 30 % Remission % Remission 25 25 20 20 15 15 10 10 5 5 0 0 Control Drug 1 Drug 2 Drug 3 Control Drug 1 Drug 2 Drug 3 ANOVA To know which we still need to run the 3 t-tests Drug 1 t e st t- t-test But we saved one step in Control Drug 2 case there was no difference t -t es t Drug 3 ANOVA Let’s see an example. I want to know if any of three degrees people have will have an influence on their salaries. I sample a few degree holders’ salaries (in 1000 £/year) and place them as 3 categories on a table ANOVA To run ANOVA on Excel we need to enable the “Analysis Toolpak” Add-in Go to Options, Excel Add-ins ANOVA To run ANOVA on Excel we need to enable the “Data processing” Add-in Then tick the Analysis ToolPak and press OK ANOVA Once done, we’ll have it available in the “Data” tab Click and select “ANOVA Single Factor” ANOVA Then it’s just a matter of inputting our three column data range. Other options are OK ANOVA And we get our results in a separate sheet There are many parameters for specialists but of course we only care about the p-value And that says we have significance: one of the degrees does carry a different average salary ANOVA Now let’s run the 3 t-tests to work out which one 0.001 Economics Medicine 0.1258 0.0001 History A degree in Medicine will offer significantly higher salaries than History or Economics (you’re on the right track) ANOVA ANOVA on many related conditions affecting a variable (as for the degrees- salaries) is called one-way ANOVA If we want to study the effect of several predictor variables on the same outcome at the same time, we will use a two-way ANOVA But this is beyond our scope Both these tests (t-test and ANOVA) are obviously available as R functions with more complete outputs Attend the R workshop this week to try them out for yourself NEXT TIME… Last but not least, we’ll examine the third statistics case: categorical vs categorical Categorical 23 12 46 21 Categorical Chi squared and Fisher Stay tuned for MentiMeter…