Docstoc

統計方法在企業界之應用

Document Sample
統計方法在企業界之應用 Powered By Docstoc
					    Inference on the Variance of a
    Normal Population (I)
   H0: s2 = s02
    H1: s2  s02 , where s02 is a specified constant.
   Sampling from a normal distribution with unknown mean m
    and unknown variance s2, the quantity

                           2 
                                n  1S 2
                                      s2
    has a Chi-square distribution with n-1 degrees of freedom.
    That is,

                      2
                           
                             n  1S 2          ~  n 1
                                                     2

                                s2

    91                           Statistics II              Horng-Chyi Horng
    Inference on the Variance of a
    Normal Population (II)
   Let X1, X2, …, Xn be a random sample for a normal
    distribution with unknown mean m and unknown variance
    s2. To test the hypothesis
          H0: s2 = s02
          H1: s2  s02 , where s02 is a specified constant.
    We use the statistic



   If H0 is true, then the statistic has a chi-square distribution
    with n-1 d.f..


    92                       Statistics II             Horng-Chyi Horng
      PDF of chi - square distribution :

           f x   k / 2
                          1
                               x k / 2 1e  x / 2 x  0
                   2 k / 2 
      k is the number of degrees of freedom.

      In addition,
                     mk
                     s 2  2k




93   Statistics II                       Horng-Chyi Horng
    The Reasoning

   For H0 to be true, the value of 02 can not be too large or
    too small.

   What values of 02 should we reject H0? (based on a
    value)
     What values of 02 should we conclude that there is not
    enough evidence to reject H0?




    94                      Statistics II            Horng-Chyi Horng
95   Statistics II   Horng-Chyi Horng
Example 8-11
An automatic filling machine is used to fill bottles with
liquid detergent. A random sample of 20 bottles results in
a sample variance of fill volume of s2 = 0.0153 (fluid
ounces)2. If the variance of fill volume exceeds 0.01 (fluid
ounces)2, an unacceptable proportion of bottles will be
underfilled and overfilled. Is there evidence in the sample
data to suggest that the manufacturer has a problem with
underfilled and overfilled bottles? Use a = 0.05, and
assume that fill volume has a normal distribution.




96                     Statistics II             Horng-Chyi Horng
97   Statistics II   Horng-Chyi Horng
  Hypothesis Testing on Variance
  - Normal Population

  H1       Test Statistic                   Reject H0 if
s2  s02                       0   a / 2 , n 1 or  0   12a / 2 , n 1
                                2     2                 2



            
               n  1S 2
                                             0   a , n 1
            2
s2 > s02    0
                   s02
                                              2     2




s2 < s02                                     0   12a , n 1
                                              2




  98                        Statistics II                            Horng-Chyi Horng
    Finding P-Values
   Steps:
    1. Find the degrees of freedom (k = n-1)in the the 2-table.
    2. Compare 02 to the values in that row and find the
    closest one.
    3. Look the a value associated with the one you pick. The
    p-value of your test is equal to this a value.

   In example 8-11, 02 = 29.07, k = n-1 = 19, 0.05 < P-Value
    < 0.10 because the 2 value associated with (k = 19, a =
    0.10) is 27.20 while the 2 value associated with (k = 19, a
    = 0.05) is 30.14

    99                     Statistics II            Horng-Chyi Horng
    P-Values of Hypothesis Testing
    on Variance

  H1       Test Statistic                          P-Value
s2  s02                                    2
                                              
                            P  2 * min P  n 1   0 , P  n 1   0
                                                     2
                                                              
                                                             2        2
                                                                                      
               n  1S 2
s2 > s02    
            2
            0
                   s02                              
                                              P  P  n 1   0
                                                      2        2
                                                                   
s2 < s02                                            
                                              P  P  n 1   0
                                                      2        2
                                                                   




    100                       Statistics II                        Horng-Chyi Horng
    The Operating Characteristic Curves
    - Chi-square test
   Use to performing sample size or type II error calculations.
   The parameter l is defined as:
                                    s
                                 l
                                    s0
    for various sample sizes n, where s denotes the true value
    of the standard deviation.
   Chart VI I,j,k,l are used in chi-square test. (pp. A16-A17)




    101                    Statistics II            Horng-Chyi Horng
Example 8-12




   102         Statistics II   Horng-Chyi Horng
103   Statistics II   Horng-Chyi Horng
     Construction of the C.I. on the
     Variance
   In general, the distribution of  
                                     2  n  1S 2
    is chi-square with n-1 d.f.
                                                             s2

   Use the properties of t with n-1 d.f.,
                                                
            P 12a / 2,n 1   2  a / 2,n 1  1  a
                                       2


               2
            P 1a / 2,n 1 
                                n  1S 2   2   1  a
                                             a / 2 , n 1 
                                                           
                                  s  2
                                                           
               n  1S 2           n  1S 2   1  a
            P 2
                             s 2  2            
                 a / 2 , n 1       1a / 2,n 1 
                                                   
     104                         Statistics II              Horng-Chyi Horng
Formula for C.I. on the Variance




     105                  Statistics II   Horng-Chyi Horng
Formula for C.I. on the Variance
- One-sided




     106                  Statistics II   Horng-Chyi Horng
Example 8-13
Reconsider the bottle filling machine problem in Example 8-
11. Find a 95% upper-C.I. on the variance?


     N = 20, s2 = 0.0153

                           2
                            0.95,19       10.117
            Therefore, s2  (20-1)0.0153/10.117 = 0.0287

      The 95% upper-C.I. on the variance is 0.0287.

      In addition, the 95% upper-C.I. on the standard deviation
      is 0.0287 = 0.17.


107                          Statistics II             Horng-Chyi Horng
    Inference on a Population
    Proportion(I)

   H0: p = p0
    H1: p  p0 , where p0 is a specified constant.
   P = X/n, in which X is a binomial variable, i.e., the number
    of success in n trials. E(X) = np, V(X) = npq = np(1-p)

   If H0 is true, then using the normal approximation to the
    binomial, the quantity
                                     X  np0        P  p0
                              Z0                 
                                    np0 1  p0    p0 1  p0 
    follows the standard normal distribution(Z).         n


    108                     Statistics II              Horng-Chyi Horng
    Inference on a Population Proportion
    (II)
   Let x be the number of observations in a random sample
    of size n that belongs to the class associated with p. To
    test the hypothesis
          H0: p = p0
          H1: p  p0 , where p0 is a specified constant.
    We use the statistic
                                             
                       x  np0               p  p0
               Z0                  
                      np0 1  p0          p0 1  p0 
                                                 n
                       x
               where p  is the sample proportion.
                        n
    109                     Statistics II                  Horng-Chyi Horng
    The Reasoning

   For H0 to be true, the value of Z0 can not be too large or
    too small.

   What values of Z0 should we reject H0? (based on a value)
    What values of Z0 should we conclude that there is not
    enough evidence to reject H0?




    110                    Statistics II             Horng-Chyi Horng
Example 8-14
A semiconductor manufacturing produces controllers used
in automobile engine applications. The customer erquires
that the process fallout or fraction defective at a critical
manufacturing step not exceed 0.05 and that the
manufacturing demonstrate process capacity at this level
of quality using a = 0.05. The semiconductor
manufacturer takes a random sample of 200 devices and
finds that four of them are defective. Can the
manufacturer demonstrate process capacity for the
customer?



111                    Statistics II            Horng-Chyi Horng
   The parameter of interest is the process fraction defective.
   H0: p = 0.05
    H1: p < 0.05
    This formulation of the problem will allow the manufacturer to make a strong claim
    about process capacity if the null hypothesis H 0: p = 0.05 is rejected.
   a = 0.05, x = 4, n = 200, and p0 = 0.05.
   To reject H0: p = 0.05, the test statistic Z0 must be less than -z0.05 = -1.645

              x  np0        4  200(0.05)
       Z0                                    1.95
              np0 1  p0    200(0.05)(0.95)
                
                p  p0        4 / 200  0.05
       Z0                                   1.95
               p0 1  p0       0.05(0.95)
                    n               200
   Conclusion: Since Z0 = -1.95 < -z0.05 = -1.645, we reject H0 and conclude that the
    process fraction defective p is less than 0.05. The P-value for this value of the test
    statistic Z0 is P = 0.0256, which is less than a = 0.05. We conclude that the process
    is capable.


       112                                Statistics II                       Horng-Chyi Horng
Hypothesis Testing on a
Population Proportion


      H1     Test Statistic                  Reject H0 if
  p  p0           X  np0              Z0 > za2 or Z0 < - za2
           Z0                  or
                  np0 1  p0 
  p > p0           
                   p  p0
                                                Z0 > za
           Z0 
                  p0 1  p0 
  p < p0               n                       Z0 < -za




113                     Statistics II                  Horng-Chyi Horng
P-Values of Hypothesis Testing
on a Population Proportion


      H1     Test Statistic                 P-Value
  p  p0           X  np0              P = 2*P(Z > |Z0|)
           Z0                  or
                  np0 1  p0 
  p > p0                                P = P(Z > Z0)
                   p  p0
           Z0 
                  p0 1  p0 
  p < p0               n
                                         P = P(Z < Z0)




114                     Statistics II               Horng-Chyi Horng
  How to calculate Type II Error? (I)
  (H0: p = p0 Vs. H1: p  p0)

       Under the circumstance of type II error, H0 is false.
        Supposed that the true value of the population
        proportion is p. The distribution of Z0 is:
             
             p p
True                  ~ N (0,1)
             p1  p 
                n
                       
                       p  p0            p  p0        p1  p  / n 
Therefore, Z 0                    ~ N               ,                 
                      p0 1  p0      p 1  p  / n p0 1  p0  / n 
                                       0       0                       
                           n

  115                         Statistics II                Horng-Chyi Horng
     How to calculate Type II Error? (II)
      - refer to section &4.3 (&8.1)
   Type II error occurred when (fail to reject H0 while H0 is
    false)
                                                                  p  p0         p (1  p ) / n 
            Za  Z 0  Za           where Z 0 ~ N                             ,                 
                                                               p0 (1  p0 ) / n p0 (1  p0 ) / n 
                2                2
                                                                                                 
   Therefore,
         P Za / 2  Z 0  Za / 2 
                                 p  p0                     p  p0                         p  p0          
                 Za / 2                        Z0                        Za / 2                        
                              p0 (1  p0 ) / n           p0 (1  p0 ) / n               p0 (1  p0 ) / n   
             P                                                                                          
                          p(1  p) / n                 p(1  p) / n                  p (1  p) / n         
                         p0 (1  p0 ) / n             p0 (1  p0 ) / n              p0 (1  p0 ) / n       
                                                                                                           
                p  p  Za / 2 p0 (1  p0 ) / n    p  p  Za / 2 p0 (1  p0 ) / n 
             P 0                               Z 0                              
                         p(1  p) / n                       p(1  p) / n           
                                                                                   
                p  p  Za / 2 p0 (1  p0 ) / n      p  p  Za / 2 p0 (1  p0 ) / n 
              0                                  0                               
                         p(1  p) / n                         p(1  p) / n           
                                                                                     
     116                                     Statistics II                               Horng-Chyi Horng
    Formula for Type II Error

   Two-sided alternative H1: p  p0
                p0  p  Za / 2 p0 (1  p0 ) / n      p  p  Za / 2 p0 (1  p0 ) / n 
                                                 0                               
                          p(1  p) / n                         p(1  p) / n           
                                                                                      

   One-sided alternative H1: p < p0
                                     p0  p  Za p0 (1  p0 ) / n 
                             1                                
                                              p (1  p ) / n      
                                                                  

   One-sided alternative H1: p > p0

                                    p0  p  Za p0 (1  p0 ) / n 
                                                              
                                             p (1  p ) / n      
                                                                 

    117                             Statistics II                           Horng-Chyi Horng
The Sample Size (I)

     Given values of a and p, find the required sample
      size n to achieve a particular level of .
              p  p  Za / 2 p0 (1  p0 ) / n       p  p  Za / 2 p0 (1  p0 ) / n 
 Since    0                                    0                               
                        p (1  p ) / n                       p (1  p ) / n         
                                                                                    
               p0  p  Za / 2 p0 (1  p0 ) / n 
                                               when p0  p  0
                         p (1  p ) / n         
                                                
 Let     Z  
                 p0  p  Za / 2 p0 (1  p0 ) / n
 Then,  Z  
                           p (1  p ) / n
                                                            2
          Za / 2 p0 (1  p0 )  Z          p (1  p ) 
      n                                              
                         p  p0                        
                                                       
118                                 Statistics II                        Horng-Chyi Horng
     The Sample Size (II)

   Two-sided Hypothesis Testing




   One-sided Hypothesis Testing




     119                  Statistics II   Horng-Chyi Horng
Example 8-15
(1) Consider the semiconductor manufacturer from Example
   8-14. Suppose that his process fallout is really p = 0.03.
   What is the -error for his test of process capacity, which
   uses n = 200 and a = 0.05?

(2) Suppose that the semiconductor manuafcturer was willing
   to accept a -error as large as 0.10 if the true value of the
   process fraction defective was p = 0.03. If the
   manufacturer continue to use a = 0.05, what sample size
   would be required?



    120                     Statistics II            Horng-Chyi Horng
(1) Since H1: p < 0.05, therefore

                          p0  p  Za p0 (1  p0 ) / n 
                  1                                
                                   p(1  p) / n        
                                                       
                          0.05  0.03  (1.645) 0.05(0.95) / 200 
                   1                                          
                                                                 
                                      0.03(0.97) / 200           
                   1  (0.44)
                   0.67


(2) The sample size required for this one-sided alternative is
                                                                  2
                         Za p0 (1  p0 )  Z       p(1  p) 
                      n                                     
                                     p  p0                  
                                                             
                                                                      2
                           1.645 0.05(0.95)  1.28 0.03(0.97) 
                                                             
                                      0.03  0.05             
                                                              
                         832

     121                             Statistics II                        Horng-Chyi Horng
Formula for C.I. on the Population Proportion


                       
                        p p
                                  ~Z
                       p (1  p )
                           n




     122                   Statistics II        Horng-Chyi Horng
Formula for One-Sided C.I. on the Population Proportion




     123                 Statistics II         Horng-Chyi Horng
   Example 8-16

  In a random sample of 85 automobile engine crankshaft
  bearings, 10 have a surface finish that is rougher than the
  specifications allow. Construct a 95% C.I. on the
  population proportion p?
Sol:
                  
         n  85, p  x / n  10 / 85  0.12
         95% C.I. onp is
                                                           
                            p(1  p)                 p(1  p)
                p  z0.025             p  p  z0.025
                                n                         n
                         0.12(0.88)                   0.12(0.88)
           0.12  1.96              p  0.12  1.96
                             85                           85
           0.05  p  0.19
   124                                Statistics II               Horng-Chyi Horng
Choice of Sample Size for C.I. on a Population Proportion




     where E is the half-width of the C.I.
                                                   
                               E | p  p |

     Since the max value for p(1-p) is 0.25 for 0  p  1, we can use the
      following formula instead.




      125                          Statistics II                Horng-Chyi Horng
126   Statistics II   Horng-Chyi Horng

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:3
posted:8/29/2012
language:English
pages:36