## MS Mod 22: χ2 tests – practice problems

 Author Message NEAS Supreme Being         Group: Administrators Posts: 4.2K, Visits: 1.2K MS Module 22: χ2 tests – practice problems(The attached PDF file has better formatting.)Exercise 22.1: χ2 When Parameters Are EstimatedThe groups of phenotypes, R, S, and T, are in equilibrium if for some θ:●    P(R) = p1 = θ2 ●    P(S) = p2 = 2θ(1–θ) ●    P(T) = p3 = (1–θ)2A sample from a population has the following number of observations in each group:●    Group R: n1 = 145●    Group S: n2 = 235●    Group T: n3 = 120The null hypothesis H0 is that the population is in equilibrium for some parameter θ.A.    What is the maximum likelihood estimate for θ?B.    What are the expected cell counts?C.    What is the χ2 statistic to test the null hypothesis that the population is in equilibrium?D.    What is the p value to test the null hypothesis that the population is in equilibrium?Part A: The likelihood is of the observed values given θ is     [π1(θ)]n1 × [π2(θ)]n2 × [π3(θ)]n3 = [θ2]n1 × [2θ(1–θ)]n2 × [(1–θ)2]n3 = 2n2 × θ2n1 + n2 × 1–θ)n2+2n3Maximizing the loglikelihood (the natural logarithm of the likelihood) with respect to θ yields = (2n1 + n2) / [(2n1 + n2) + (n2 + 2n3)] = (2n1 + n2) / 2n, where n = n1 + n2 + n3 =(2 × 145 + 235) / (2 × 500) = 0.525where n1 = 145, n2 = 235, and n = 500.Part B: The expected cell counts are●    Group R: 500 × 0.5252 = 137.8125●    Group S: 500 × 2 × 0.525 × (1 – 0.525) = 249.3750●    Group T: 500 × (1 – 0.525)2 = 112.8125Part C: The χ2 statistic contributions to test the null hypothesis that the population is in equilibrium is●    Group R: (145 – 137.8125)2 / 137.8125 = 0.374858●    Group S: (235 – 249.375)2 / 249.375 = 0.828634●    Group T: (120 – 112.8125)2 / 112.8125 = 0.457929The χ2 statistic is 0.374858 + 0.828634 + 0.457929 = 1.661421Part D: The p value = 1 – the cumulative distribution function of the χ2 distribution with (3 – 1 – 1) degrees of freedom = 0.197411 (table lookup or spreadsheet function).Jacob: Why are the degrees of freedom = 3 – 1 – 1 = 1?Rachel: The scenario has two constraints:●    The sum of the observations in the groups = the total number of observations. ●    The observations by group satisfy the proportions:     ○    P(R) = p1 = θ2     ○    P(S) = p2 = 2θ(1–θ)     ○    P(T) = p3 = (1–θ)2 Exercise 22.2: Testing for a normal distributionWe draw a sample of 100 points to test whether a population is normally distributed. Before drawing the sample, we assume the population’s mean μ is 8 and its standard deviation σ is 2.We group the sample values into five groups (–∞, k1), (k1, k2), (k2, k3), (k3, k4), (k4, ∞), which have the same expected number of observations if the population ∼ N(8, 22).Summary statistics for the 100 sample values are xi = 840 and xi2 = 7,535.16.The number of sample values in the five groups are 16, 18, 19, 21, and 26.A.    What are the values of k1, k2, k3, and k4?B.    What is the mean of the sample?C.    What is the standard deviation of the sample?D.    What are the percentile bounds for the five groups using the sample mean and standard deviation? E.    What are the expected number of observations in the five groups using the sample mean and the sample standard deviation for the population? F.    What is the χ2 value to test the null hypothesis? G.    How many degrees of freedom does the χ2 value have? H.    What is the p value to test the null hypothesis? Part A: If the population were ∼ N(0.1), the values of k1, k2, k3, and k4 would be●    -0.841621●    -0.253347●    0.253347●    0.841621Since the population is assumed to be ∼ N(8,2), the values of k1, k2, k3, and k4 are●    -0.841621 × 2 + 8 = 6.316758●    -0.253347 × 2 + 8 = 7.493306●    0.253347 × 2 + 8 = 8.506694●    0.841621 × 2 + 8 = 9.683242Part B: The mean of the sample is xi / n = 840 / 100 = 8.4Part C: The variance of the sample is (xi2 – (xi)2/n)/(n-1) =(7,535.16 – 8402/100)/(100 – 1) = 4.84The standard deviation of the sample is 4.840.5 = 2.20Part D: If the population is ∼ N(8.4,2.22), the percentiles for k1, k2, k3, and k4 are●    (6.316758 – 8.4) / 2.2 = -0.946928●    (7.493306 – 8.4) / 2.2 = -0.412134●    (8.506694 – 8.4) / 2.2 = 0.048497●    (9.683242 – 8.4) / 2.2 = 0.583292The bounds for the five groups are●    (–∞, -0.946928)●    (-0.946928, -0.412134)●    (-0.412134, 0.048497)●    (0.048497, 0.583292)●    (0.583292, ∞)Part E: The expected number of observations in the five groups from the sample of 100 values =●    100 × Φ (-0.946928) = 17.183763●    100 × (Φ (-0.412134) – Φ (-0.946928) ) = (34.012070 – 17.183763) = 16.828307●    100 × (Φ (0.048497) – Φ (-0.412134) ) = (51.934007 – 34.012070) = 17.921936●    100 × (Φ (0.583292) – Φ (0.048497) ) = (72.015164 – 51.934007) = 20.081157●    100 × (1 – Φ (0.583292) ) = (100 – 72.015164) = 27.984836Part F: The contribution of each group to the χ2 statistic is●    (16 – 17.183763)2 / 17.183763 = 0.081548●    (18 – 16.828307)2 / 16.828307 = 0.081581●    (19 – 17.921936)2 / 17.921936 = 0.064849●    (21 – 20.081157)2 / 20.081157 = 0.042043●    (26 – 27.984836)2 / 27.984836 = 0.140775The χ2 statistic used to test the null hypothesis that the population is normally distributed =     0.081548 + 0.081581 + 0.064849 + 0.042043 + 0.140775 = 0.410796Part G: The χ2 value has 5 – 1 = 4 degrees of freedom: 5 groups – 1 constraint (the sum of the observations in the five groups = the total observations). Part H: The p value is 1 – the cumulative distribution function of the χ-squared distribution with 4 degrees of freedom at 0.410796 = 0.981584 (table lookup or spreadsheet function).Question: Why is the p value so high?Answer: The actual number of observations by group are close to the expected number of observations. The slight differences presumably stem from rounding and random fluctuations. The total χ2 is much less than the degrees of freedom, so we do not reject the null hypothesis that the population is normally distributed. Exercise 22.3: PhenotypesThe expected proportions of subjects with four phenotypes is 9/16, 3/16, 3/16, and 1/16.The observed values in an experiment are 895, 280, 305, and 120.A.    What are the expected values in each cell?B.    What is the χ2 value to test the null hypothesis? C.    What are the degrees of freedom? D.    What is the p value to test the null hypothesis? Part A: The total subjects = 895 + 280 + 305 + 120 = 1600The expected counts in the four groups are1.    9/16 × 1600 = 9002.    3/16 × 1600 = 3003.    3/16 × 1600 = 3004.    1/16 × 1600 = 100Part B: The χ2 value is the sum of the contributions from the four groups, which are1.    (895 – 900)2 / 900 = 0.02782.    (280 – 300)2 / 300 = 1.33333.    (305 – 300)2 / 300 = 0.08334.    (120 – 100)2 / 100 = 4.0000The χ2 value is 0.0278 + 1.3333 + 0.0833 + 4.000 = 5.4444Part C: The χ2 test has four cells and one constraint (the total actual values = the total expected values), so the degrees of freedom = 4 – 1 = 3.Part D: The p value = 1 – χ2 cdf(5.4444, 3) = 0.142 (table lookup or spreadsheet function). Attachments MS Module 22 chisq tests – practice problems df.pdf (273 views, 70.00 KB) Edited 3 Years Ago by NEAS
##### Merge Selected
Merge into selected topic...

Merge into merge target...

Merge into a specific topic ID...

## Reading This Topic

##### Login
 Existing Account Email Address: Password: Remember Me Social Logins
##### Select a Forum....
 VEE Financial Accounting (on-line course)      VEE Fin Accg textbook and course structure      FA practice exam questions      FA Mod 1: Financial Statements      FA Mod 2: Financial reporting standards      FA Mod 3: The income statement (statement of profit and loss)      FA Mod 4: The balance sheet (statement of financial position)      FA Mod 5: The Cash Flow Statement      FA Mod 6: Articulation of the income statement, balance sheet, and...      FA Mod 7: Financial analysis techniques      FA Mod 8: Inventories      FA Mod 9: Accounting for long-lived assets      FA Mod 10: Long-term (non-current) liabilities      FA Mod 11: Operating leases and finance leases      FA Mod 12: Accounting for income taxes      FA Mod 13: Deferred taxes assets and liabilities      FA Mod 14: Employee pensions and share-based compensation      FA Mod 15: Financial investments      FA Mod 16: Equity method of accounting      FA Mod 17: Business combinations      FA Mod 18: Foreign currency transactions      FA Mod 19: Foreign currency translation      FA Mod 20: Insurance contracts: GAAP      FA Module 21: IFRS 17 (insurance contracts) General measurement model      FA Module 22: IFRS 17 (insurance contracts) Revenue + expense;...      FA Module 23: IFRS 17 Premium allocation approach; reinsurance...      FA Module 24: IFRS 17 (insurance contracts) Reconciliations of the... VEE On-line Course: Mathematical Statistics      VEE Math Stat: textbook and course structure      MS statistical tables for final exam      MS practice exam questions      MS Module 1 Background and data visualization      MS Mod 2 Confidence intervals      MS Mod 3: Confidence intervals; t distributions; variances      MS Mod 4: Hypotheses and Test Procedures      MS Mod 5: Hypothesis testing of proportions      MS Mod 6: Inferences Based on Two Samples      MS Mod 7: Two-Sample t Test and Confidence Interval      MS Mod 8: Paired data and Two Population Proportions & Variances      MS Mod 9: Single-Factor ANOVA      MS Mod 10: Single-Factor ANOVA – Levene’s test      MS Mod 11: Single-Factor ANOVA – Tukey’s honestly statistical...      MS Mod 12: Expected values and β’s for ANOVA + unequal sample sizes      MS Mod 13: Two-Factor ANOVA without interaction effects      MS Mod 14: Two-factor ANOVA, interaction effects      MS Mod 15: Linear and logistic regression models      MS Mod 16: Regression estimates      MS Mod 17: Regression analysis confidence intervals and hypothesis...      MS Mod 18: Regression analysis: Fitted values and predictions      MS Mod 19: Correlation      MS Mod 20: Residuals and Standardized Residuals      MS Mod 21: Multiple regression analysis      MS Mod 22: χ2 tests      MS Mod 23: Actuarial risk classification      MS Mod 24: Actuarial risk classification – other bias functions VEE Exam Course: Corporate Finance      Updates      Registration      Benefits of online course      Course scheduling      Introduction      Materials      Homework assignments      Final exam      Questions      Module 1: Present value and the opportunity cost of capital      Module 2: Calculating present values      Module 3: Value of common stocks      Module 4: Net present value vs other valuation models      Module 5: Investment decisions and net present value      Module 6: Risk, return, and the opportunity cost of capital      Module 7: Risk and return      Module 8: Capital budgeting and risk      Module 9: Analyzing corporate projects      Module 10: Positive net present value      Module 11: Maximizing net present value      Module 12: Corporate financing and market efficiency      Module 13: Corporate financing      Module 14: The capital markets      Module 15: Common stock dividends      Module 16: Debt policy      Module 17: Optimal corporate borrowing      Module 18: Financing and valuation: weighted average cost of capital      Module 19: Financing and valuation: adjusted present value      Module 20: Introduction to options      Module 21: Option valuation      Module 22: Real options      Module 23: Advanced option valuation      Module 24: Financial analysis and planning VEE Exam Course: Microeconomics      Registration      Updates      Benefits of online course      Course scheduling      Introduction      Materials      Homework assignments      Final exam      Questions      Module 1: Consumer's Demand, Producer's Supply, and Equilibrium      Module 2: Prices, costs, and the gains from trade      Module 3: The behavior of consumers      Module 4: Consumers in the marketplace      Module 5: The behavior of firms      Module 6: Production and costs      Module 7: Competition: short run      Module 8: Competition: long run      Module 9: Welfare economics and the gains from trade      Module 10: Knowledge and information      Module 11: Monopoly      Module 12: Price discrimination      Module 13: Market power      Module 14: Collusion, cartels, and regulation      Module 15: Oligopoly, monopolistic competition, and product...      Module 16: The theory of games      Module 17: Externalities: Pigou and Coase      Module 18: Externalities: transaction costs, law and economics      Module 19: Common property and public goods      Module 20: The demand for factors of production      Module 21: The market for labor      Module 22: Wages and discrimination      Module 23: Allocating goods over time      Module 24: Risk and uncertainty VEE Exam Course: Macroeconomics      Textbook      Syllabus      Homework assignments      Course questions      Final exam         Macro practice exam questions      Macro Module 1: National Income Accounting      Macro Module 2: Economic Growth      Macro Module 3: Growth Models      Macro Module 4: Working with the Solow Growth Model      Macro Module 5: Conditional Convergence and Long-Run Economic Growth      Macro Module 6: Markets, Prices, Supply, and Demand      Macro Module 7: Market Clearing      Macro Module 8: Consumption, Savings, and Investment      Macro Module 9: An Equilibrium Business Cycle Model      Macro Module 10: Business Cycle Effects      Macro Module 11: Capital Utilization and Unemployment      Macro Module 12: Demand for Money      Macro Module 13: Price Levels and Seasonal Variations      Macro Module 14: Inflation and Interest Rates      Macro Module 15: Inflation, Interest Rates, and Money Growth      Macro Module 16: Government Expenditures      Macro Module 17: Temporary Changes in Government Expenditures and War...      Macro Module 18: Taxes      Macro Module 19: Public Debt      Macro Module 20: Debt and Social Security      Macro Module 21: Price mis-perceptions model, theory      Macro Module 22: Price mis-perceptions model, empirical evidence      Macro Module 23: Sticky prices (new Keynesian model)      Macro Module 24: New Keynesian model and sticky wages VEE Exam Course: Regression Analysis John Fox text      Registration      Course scheduling      Introduction      Materials      Homework assignments      Questions      Final exam      Fox Module 1 Statistical models      Fox Module 2 Basics of regression analysis      Fox Module 3 Univariate displays      Fox Module 4 Bivariate displays      Fox Module 5 Multivariate displays      Fox Module 6 Transforming data      Fox Module 7 Advanced transformations      Fox Module 8 Linear least squares regression      Fox Module 9 Multiple regression      Fox Module 10 Advanced multiple regression      Fox Module 11 Statistical inference for simple linear regression      Fox Module 12 Statistical inference for multiple regression      Fox Module 13 Dummy variable regression      Fox Module 14 Modeling interactions      Fox module 15 advanced interactions      Fox Module 16 Analysis of variance      Fox Module 17 Unusual and influential data      Fox Module 18 Outliers and Influence advanced      Fox Module 19 Heteroscedasticity      Fox Module 20 Collinearity      Fox Module 21 Generalized linear models concepts      Fox Module 22 Generalized linear models discrete and continuous data      Fox Module 23 Generalized linear models, probabilities      Fox Module 24 Student project requirements and templates VEE Regression Analysis Student Project      Student Projects: Read First (Basic Information)      Other Ideas: Parameter Stability and Heteroscedasticity      Project Template: Sports Won-Loss Statistics      Regression Analysis Student Project Samples      Loss Reserving      RA student project questions VEE Exam Course: Time Series Cryer Chan text      Registration      Materials      Introduction      Homework assignments      Course scheduling      Final exam      Questions      TS Module 1 Time series overview      TS Module 2 Time series concepts      TS Module 3 Trends      TS Module 4 Regression methods      TS Module 5 Stationary moving average processes      TS Module 6 Stationary autoregressive processes      TS Module 7 Stationary mixed processes      TS Module 8 Non-stationary time series basics      TS Module 9 Non-stationary ARIMA time series      TS Module 10 Autocorrelation functions      TS Module 11 Simulated and actual time series      TS Module 12 Parameter estimation method of moments      TS Module 13 Parameter estimation least squares      TS Module 14 Model diagnostics      TS Module 15 Forecasting basics      TS Module 16 ARIMA Forecasting      TS Module 17 Forecasting bounds      TS Module 18 Forecast updates and weights      TS Module 19 Seasonal models basics      TS Module 20 Seasonal models advanced      TS Module 21 Building an ARIMA process      TS Module 22 Student projects interest rates      TS Module 23 Student projects sport statistics      TS Module 24 Student projects weather and demographics VEE Time Series Student Project      Time Series Student Project Samples      Student Project Samples      Indices for TS Student Projects      Interest Rates      Student Project General: Introduction, Write-up, Grading (Read First)      Weather: Daily Temperature Data      Time Series Techniques      Time Series Project Templates      ARIMA Modeling      Web Sites and Data Questions