4.7.1. Consider Example 4.7.2. Suppose the observed frequencies of A₁,..., A4 are 20, 30, 92, and 105, respectively. Modify the R code given in the example to calculate the test for these new frequencies. Report the p-value.

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question
Please skip the part where you are asked to use or modify R codes.
**Example 4.7.2**

A point is to be selected from the unit interval \({x : 0 < x < 1}\) by a random process. Let \(A_1 = \{x : 0 < x \leq \frac{1}{4}\}\), \(A_2 = \{x : \frac{1}{4} < x \leq \frac{1}{2}\}\), \(A_3 = \{x : \frac{1}{2} < x \leq \frac{3}{4}\}\), and \(A_4 = \{x : \frac{3}{4} < x < 1\}\). Let the probabilities \(p_i\), \(i = 1, 2, 3, 4\), assigned to these sets under the hypothesis be determined by the pdf \(2x\), \(0 < x < 1\), zero elsewhere. Then these probabilities are, respectively,

\[
p_{10} = \int_{0}^{1/4} 2x \, dx = \frac{1}{16}, \quad p_{20} = \frac{3}{16}, \quad p_{30} = \frac{5}{16}, \quad p_{40} = \frac{7}{16}.
\]

Thus the hypothesis to be tested is that \(p_1, p_2, p_3,\) and \(p_4 = 1 - p_1 - p_2 - p_3\) have the preceding values in a multinomial distribution with \(k = 4\). This hypothesis is to be tested at an approximate 0.025 significance level by repeating the random experiment \(n = 80\) independent times under the same conditions. Here the \(np_{i0}\) for \(i = 1, 2, 3, 4,\) are, respectively, 5, 15, 25, and 35. Suppose the observed frequencies of \(A_1, A_2, A_3,\) and \(A_4\) are 6, 18, 20, and 36, respectively. Then the observed value of \(Q_3 = \sum_{1}^{4} (X_i - np_{i0})^2/(np_{i0})\) is
Transcribed Image Text:**Example 4.7.2** A point is to be selected from the unit interval \({x : 0 < x < 1}\) by a random process. Let \(A_1 = \{x : 0 < x \leq \frac{1}{4}\}\), \(A_2 = \{x : \frac{1}{4} < x \leq \frac{1}{2}\}\), \(A_3 = \{x : \frac{1}{2} < x \leq \frac{3}{4}\}\), and \(A_4 = \{x : \frac{3}{4} < x < 1\}\). Let the probabilities \(p_i\), \(i = 1, 2, 3, 4\), assigned to these sets under the hypothesis be determined by the pdf \(2x\), \(0 < x < 1\), zero elsewhere. Then these probabilities are, respectively, \[ p_{10} = \int_{0}^{1/4} 2x \, dx = \frac{1}{16}, \quad p_{20} = \frac{3}{16}, \quad p_{30} = \frac{5}{16}, \quad p_{40} = \frac{7}{16}. \] Thus the hypothesis to be tested is that \(p_1, p_2, p_3,\) and \(p_4 = 1 - p_1 - p_2 - p_3\) have the preceding values in a multinomial distribution with \(k = 4\). This hypothesis is to be tested at an approximate 0.025 significance level by repeating the random experiment \(n = 80\) independent times under the same conditions. Here the \(np_{i0}\) for \(i = 1, 2, 3, 4,\) are, respectively, 5, 15, 25, and 35. Suppose the observed frequencies of \(A_1, A_2, A_3,\) and \(A_4\) are 6, 18, 20, and 36, respectively. Then the observed value of \(Q_3 = \sum_{1}^{4} (X_i - np_{i0})^2/(np_{i0})\) is
**4.7.1.** Consider Example 4.7.2. Suppose the observed frequencies of \( A_1, \ldots, A_4 \) are 20, 30, 92, and 105, respectively. Modify the R code given in the example to calculate the test for these new frequencies. Report the \( p \)-value.
Transcribed Image Text:**4.7.1.** Consider Example 4.7.2. Suppose the observed frequencies of \( A_1, \ldots, A_4 \) are 20, 30, 92, and 105, respectively. Modify the R code given in the example to calculate the test for these new frequencies. Report the \( p \)-value.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

DEGREES OF FREEDOM=n-1=3

but n=247 right?

also how did you did significant level = .025

did you use any table or any other sources ?

how x^2 3,0.025= 9.348? any table or formula?

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

how did you get (o-E)^2/E=10.23

 (247-247)^2/247=0

PLEASE EXPLAIN

Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman