HIMS 650 Homework set 5 Putting it all together

Slides:



Advertisements
Similar presentations
Data Display: Tables and Graphs
Advertisements

Applied Econometrics Second edition
CHI-SQUARE(X2) DISTRIBUTION
M&Ms Two-way Tables Ellen Gundlach STAT 301 Course Coordinator Purdue University.
A frequency distribution for two variables
Chi-Square Test A fundamental problem is genetics is determining whether the experimentally determined data fits the results expected from theory (i.e.
CHAPTER 23: Two Categorical Variables: The Chi-Square Test
Chapter 10 Regression. Defining Regression Simple linear regression features one independent variable and one dependent variable, as in correlation the.
Statistics: Data Analysis and Presentation Fr Clinic II.
Data Freshman Clinic II. Overview n Populations and Samples n Presentation n Tables and Figures n Central Tendency n Variability n Confidence Intervals.
Chapter 12a Simple Linear Regression
Statistics: Data Presentation & Analysis Fr Clinic I.
1 Summary Statistics Excel Tutorial Using Excel to calculate descriptive statistics Prepared for SSAC by *David McAvity – The Evergreen State College*
Chapter 26: Comparing Counts. To analyze categorical data, we construct two-way tables and examine the counts of percents of the explanatory and response.
CS1100: Computer Science and Its Applications Creating Graphs and Charts in Excel.
Chi-Square Test A fundamental problem in genetics is determining whether the experimentally determined data fits the results expected from theory (i.e.
Testing Distributions Section Starter Elite distance runners are thinner than the rest of us. Skinfold thickness, which indirectly measures.
1 1 Slide © 2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 1 Slide Simple Linear Regression Part A n Simple Linear Regression Model n Least Squares Method n Coefficient of Determination n Model Assumptions n.
1 1 Slide © 2004 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Graphing Guidelines  Often the goal of an experiment is to find the relationship between two variables.  As one variable changes, so does the other.
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
Honors Physics Lab Journals Graphing. Lab Journal Entries  Number pages in consecutive order  Date all entries  Title all activities and investigations.
Chi-Square Test A fundamental problem in genetics is determining whether the experimentally determined data fits the results expected from theory. How.
Graphing with Excel The Basics. Working With Excel The spreadsheet program Excel is useful for constructing data tables and graphs The results can easily.
Graphical Analysis in Excel EGN 1006 – Introduction to Engineering.
© Copyright McGraw-Hill Correlation and Regression CHAPTER 10.
Correlation Coefficient -used as a measure of correlation between 2 variables -the closer observed values are to the most probable values, the more definite.
EXCEL GRAPHING *Basic Graphing Steps* by A.B. -NNHS.
Data Analysis, Presentation, and Statistics
Regression Analysis in Microsoft Excel MS&T Physics 1135 and 2135 Labs.
Chi-Square Test (χ 2 ) χ – greek symbol “chi”. Chi-Square Test (χ 2 ) When is the Chi-Square Test used? The chi-square test is used to determine whether.
Chapter 14 – 1 Chi-Square Chi-Square as a Statistical Test Statistical Independence Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
Graphing in Excel X-Y Scatter Plot SCI 110 CCC Skills Training.
HIMS 650. * To learn how to use the Excel program, watch these helpful Youtube.com videos:
Chi-Square Test A fundamental problem is genetics is determining whether the experimentally determined data fits the results expected from theory (i.e.
Basic Statistics The Chi Square Test of Independence.
Statistical Analysis: Chi Square
CHI-SQUARE(X2) DISTRIBUTION
Chi-Square Test.
Chapter 9: Non-parametric Tests
Inference for Regression (Chapter 14) A.P. Stats Review Topic #3
Chi-Square Test A fundamental problem is genetics is determining whether the experimentally determined data fits the results expected from theory (i.e.
IB Physics: Chapter 1 Lesson 2b: Graphs.
Chapter 25 Comparing Counts.
CHAPTER 10 Correlation and Regression (Objectives)
Using Excel to Graph Data
Section 10-1 – Goodness of Fit
Correlation and Regression
Using Excel to Make a Graph
Chi-Square Test.
Is a persons’ size related to if they were bullied
Chi-Square Test.
Is a persons’ size related to if they were bullied
Basic Statistics For Science Fair
Exam 5 Review GOVT 201.
The MIS and Dashboard.
Descriptive and Inferential
Inference on Categorical Data
Chi-Square Test.
Using Excel to Graph Data
Chapter 26 Comparing Counts.
Standard Deviation & Standard Error
Introduction to Graphs
UNIT V CHISQUARE DISTRIBUTION
By the end of the lesson, I want you to be able to say…
Chapter 26 Comparing Counts.
Chapter 14.1 Goodness of Fit Test.
Categorical Data In Chapter 3 we introduced the idea of categorical data. In Chapter 15 we explored probability rules and when events are independent.
Excel for Educators Class Notes
Presentation transcript:

HIMS 650 Homework set 5 Putting it all together Chapters 8 and 11

Problem 8.1 1 Building a Table Start with simple probability. Simple Probability, also called marginal probability uses the blue colored cells. Candy Color Blue Yellow Total Green 20 Pink 80 60 40 100

Problem 8.1 1 Building a Table Simple probability is expressed as P(A) = Meaning, the probability that “A” will occur Example: P(candy with the color, pink, in them) = 80/100 or 0.80 or 80% You find this probability by dividing the number of candies with pink in them by the total number of candies.

Problem 8.1 1 Building a Table Joint probability involves 2 events and uses the yellow cells in this picture. You find joint probability by multiplying two independent probabilities together. Therefore, the probability that you will find a Blue and Green colored candy in the mix is 20 times 60 divided by 100 (always divide by the total when looking for probabilities) or 18. Candy Color Blue Yellow Total Green 18 20 Pink 80 60 40 100

Problem 8.1 1 Building a Table Follow the same procedure for the rest of the cells: The probability of a yellow and green candy is (40*20)/100 = 8 The probability of a blue and pink candy is (60*80)/100 = 48 The probability of a yellow and pink candy is (40*80/100 = 32 Voila! Its that easy! Candy Color Blue Yellow Total Green 12 8 20 Pink 48 32 80 60 40 100

Problem 8.1 2 Chi Square Candy Color Blue Yellow Total Green 10 20 Now, when you calculated the joint probabilities of the candy mix in problem 8.1 1, you calculated the expected values of the candy mix, based on the simple probabilities in the margins. You will probably never get the expected values that you calculated, which is true in this case. When you count the number of different colored candies in the mix, you will find the results in this table. Candy Color Blue Yellow Total Green 10 20 Pink 50 30 80 60 40 100

Problem 8.1 2 Chi Square I am sure that the question that everyone is asking themselves at this point is: can the two colors be considered statistically independent of each other? To answer that question, we need to do the Chi Square test on both of the tables. Here is the Chi Square formula, (which is not that difficult to compute using Excel.)

Problem 8.1 2 Chi Square Candy Color Blue Yellow Green 12-10=2 8-10=-2 The variable, E, is the expected results and they are shown in the first table that we created. The variable, O, is the observed results and they are shown in the second table. Using only the yellow areas, create another table where you subtract the expected results from the observed results. Candy Color Blue Yellow Green 12-10=2 8-10=-2 Pink 48-50=-2 32-30=2

Problem 8.1 2 Chi Square Candy Color Blue Yellow Green 2*2=4 -2*-2=4 Now square the results: Candy Color Blue Yellow Green 2*2=4 -2*-2=4 Pink

Problem 8.1 2 Chi Square Now divide by the expected outcome in each case (answers are rounded to two decimal places in this example so when you use Excel, you might get a slightly different result due to rounding): Finally add all of the answers together, and Voila! You have your chi square result, which is 1.04 Candy Color Blue Yellow Green 4/12= 0.33 4/8= 0.50 Pink 4/48= 0.08 4/32= 0.13

Problem 8.1 3 Chi Square I am sure that you next question is how can I interpret the number 1.04, which is the Chi square result from our candy mix? Well, I am glad that you asked that question, so here is the answer. Use =CHIDIST() =CHIDIST() takes 2 arguments: the chi square value that we calculated, 1.04, and the degrees of freedom. The only question is how to find the degrees of freedom. The formula for finding degrees of freedom is the number of rows of joint probability minus 1 times the number of columns of joint probability numbers minus 1 or: (r-1)*(c-1) For a 2 by 2 table, like the one we just constructed the degrees of freedom is (2-1)*(2-1) = 1

Problem 8.1 3 Chi Square So, for our problem =CHIDIST(1.04, 1) = 0.45 (rounded to two decimals.) There is about a .31 or 31% chance of getting the 1.04 value. Like most of the other distributions, only reject the null hypothesis is the Chi Square value is less than .05. Do not reject the null hypothesis so assume that the colors are statistically independent.

Problem 8.1 4 Chi Square Candy Color Blue Yellow Total Green 10 20 Calculate conditional and marginal probabilities for he cross-tabulations and give it an interpretation. Since rows and columns are independent, no interpretation is necessary. Candy Color Blue Yellow Total Green 10 20 Pink 50 30 80 60 40 100 Candy Color Blue Yellow Total Green 10/60 = 17% 10/40 = 25% 20/100 = 20% Pink 50/60 = 83% 30/40 = 75% 80/100 = 80% 83%+17% = 100% 25%+75% = 100% 20%+80% = 100%

Problems 8.2 3 and 7 Chi Square (Both 8.2 3 and 8.2 7 follow the same steps. The steps for 8.2 3 are given here.) You know how to do the pivot table so you simply need to download Chpt 8-1.xls and create a pivot table for sex and length of stay by “long” or “short.” Use the pivot table that you created to create an “observed” table like problem 8.1 2. Next, use the simple or marginal probabilities and create an “expected” table like you did in problem 8.1 1. Ignore the middle of the observed table, only use the numbers on the margins for this task. Next, use these two tables to find the chi square and use =CHIDIST() to determine the hypothesis of independence. (like problem 8.2 3.) Finally, create conditional probabilities and provide an interpretation of the results like you did in problem 8.1 4. You have already done this problem, you simply need to follow the steps that you have learned.

Problem 11.1 1 You learned how to use the chart feature on Excel to generate bar charts, pie charts, etc. Now you will use the chart feature to generate an xy graph. Here is a good website to learn how to use the xy graph. http://www.excel-easy.com/examples/scatter-chart.html From the website: 1. Select your range. 2. On the insert tab, in the Charts group, choose Scatter, and select Scatter with straight lines. Note: If you want to add the axis titles, make sure you select the titles on the first row of the data along with the data. You might want to consider adding a trend line to help you visualize how well the data “fits” to the line.

Problem 11.1 1 and 11.1 2 Adding a trend line. http://www.excel-easy.com/examples/trendline.html From the website. “Right click the data series, and then click Add Trendline.” Problem 11.1 2: Just answer the 3 questions. “Which, if any, of the preceding charts appear to be the best to fit a linear model and why? Which appear to be the worst?”

Problem 11.1 5 The equation of a line is y = b(1) * x + b(0) where b(1) is the slope and b(0) is the intercept. Use the slope, intercept and x values to find what y equals and then plot the answers on a graph.

Problem 11.1 7 The slope-intercept line formula y = b(1)x + b(0) When you get the answers generated in parts a – c, use the Scatter plot feature of Excel to graph your answers.

Problem 11.3 1 part a The answer to this problem is found on page 378, labeled Figure 11.10. That’s it! You are done. Congratulations.

A soothing picture to relax you