***************************************************************************** * CHAPTER 8 - STATISTICS FOR BUSINESS & ECONOMICS, 5th Edition * ***************************************************************************** * Example 8.1, p. 259 * * Read this example carefully. Be sure you understand the methodology. * *---------------------------------------------------------------------------- * Example 8.2, p. 259 * * The SAMPLE command is used to specify the sample range of the data to be * read. The READ command inputs the data and assigns variable names. In * this case, the observation number is assigned I and the price-earning ratio * of ten stocks traded on the New York Stock Exchange on a particular day * is assigned X. The LIST option on the READ command lists all data read. * SAMPLE 1 13 READ X / LIST 10 16 13 11 12 14 12 15 14 14 13 13 13 * * The STAT command automatically prints out the sample mean, variance, * and standard deviation of the variable specified. The MEAN= option saves * the mean of X in the constant SMEAN, the VAR= option saves the variance * and STDEV= option saves the standard deviation. The PRINT command is used * used to print out the saved values. * STAT X / MEAN=SMEAN VAR=SVAR STDEV=SSTD PRINT SMEAN SVAR SSTD * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.3, p. 264 * * A random sample observation is defined as N, the standard deviation as * SIGMA and the mean as MEAN. The GEN1 command is used to generate these * constants. * GEN1 MEAN=25 GEN1 SIGMA=6 GEN1 N=16 * * The 95% Confidence Interval for the population mean is calculated with the * GEN1 command. The Lower Bound is defined as LOWER and the Upper Bound is * defined as UPPER. * * Note: From Table 1 of the Appendix, Fz(1.96)=0.975. * GEN1 LOWER=MEAN-((1.96*SIGMA)/SQRT(N)) GEN1 UPPER=MEAN+((1.96*SIGMA)/SQRT(N)) PRINT LOWER UPPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.4, p. 266 * * The contents of a random sample of bags of refined sugar is N, the mean is * MEAN, and the standard devation is SIGMA. * GEN1 N=25 GEN1 MEAN=19.8 GEN1 SIGMA=1.2 * * The 99% Confidence Interval for the population mean is calculated with * the GEN1 command. The Lower Bound is defined as LOWER and the Upper * Bound is defined as UPPER. * * Note: From Table 1 of the Appendix, Fz(2.575)=0.9950 * GEN1 LOWER=MEAN-((2.575*SIGMA)/SQRT(N)) GEN1 UPPER=MEAN+((2.575*SIGMA)/SQRT(N)) PRINT LOWER UPPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.5, p. 272 * * The SAMPLE command is used to specify the sample range of data to be read. * The READ command inputs the data. The DIF option on the READ command * tells SHAZAM that the file to be read contains information about the * variable names and number of variables. * SAMPLE 1 24 READ(TRUCKS.DIF) / DIF * * The sample mean, variance and standard deviation of X is automatically * calculated with the STAT command. The MEAN=, VAR= and STDEV= options * will store the mean, variance and standard deviation as a constant which * can then be used in constructing the 90% Confidence Interval. * PRINT MPG STAT MPG / MEAN=MEAN VAR=S2 STDEV=S PRINT MEAN S2 S * * The 90% Confidence Interval for the population mean fuel consumption * assuming the population distribution is normal is calculated with the * GEN1 command. The Lower Bound is defined as LOWER and the Upper Bound * is defined as UPPER. * * From Table 8 of the Appendix, t=1.714 when n-1=23 and SIGMA/2=0.05. * GEN1 N=24 GEN1 LOWER=MEAN-((1.714*S)/SQRT(N)) GEN1 UPPER=MEAN+((1.714*S)/SQRT(N)) PRINT LOWER UPPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.6, p. 276 * * The random sample of registered voters is N and voters who think that * the state should have a uniform voting process is defined as P. * GEN1 N=344 GEN1 P=261/N * * The 90% Confidence Interval for the population proportion of all voters * who agree with a change to a uniform process is calculated with * the GEN1 command. The Lower Bound is defined as LOWER and the Upper * Bound is defined as UPPER. * * From Table 1 of the Appendix, z(0.05)=1.645. * GEN1 LOWER=P-1.645*(SQRT((P*(1-P))/N)) GEN1 UPPER=P+1.645*(SQRT((P*(1-P))/N)) PRINT LOWER UPPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.7, page 278 * * The random sample of graduate admissions personnel is N and the proportion * of graduate admissions personnel that found the standardized test scores * to be "very important" is defined as PAT. * GEN1 N=142 GEN1 P=87/N * * The 95% Confidence Interval for the proportion of company recruiters with * this view is calculated with the GEN1 command. The Lower Bound is defined * as LOWER and the Upper Bound is defined as UPPER. * * From Table 1 of the Appendix, z(0.025)=1.96. * GEN1 LOWER=P-1.96*(SQRT((P*(1-P))/N)) GEN1 UPPER=P+1.96*(SQRT((P*(1-P))/N)) PRINT LOWER UPPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.8, p. 282 * * A random sample of temperatures is N and the variance is S2. * GEN1 N=25 GEN1 S2=100 * * The 95% Confidence Interval for the population variance temperature is * calculated with the GEN1 command. The Lower Bound is defined LOWER and * the Upper Bound is defined as UPPER. * * From Table 7 of the Appendix, Chi-squared (24,0.025)=39.364 and * Chi-squared (24, 0.975)=12.401. * GEN1 LOWER=((N-1)*S2/39.364) GEN1 UPPER=((N-1)*S2/12.401) PRINT LOWER UPPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.9, p. 285 * SAMPLE 1 8 READ PAIR A B / LIST 1 29 26 2 32 27 3 31 28 4 32 27 5 32 30 6 29 26 7 31 33 8 30 36 * * The GEN1 command is used to calculate the Difference, D and the squared * Difference, D2 for each pair. The STAT command combined with the MEAN= * option saves the Sample Mean of the difference and the STD= option saves * Sample Variance of the differences. * GENR D=A-B GENR D2=D**2 STAT D / MEAN=DBAR STD=SD PRINT DBAR SD * * Replicate Table 8.4B * PRINT PAIR A B D D2 * * The 99% Confidence Interval for the difference between the population * means is calculated with the GEN1 command. The Lower Bound is defined as * LOWER and the Upper Bound is defined as UPPER. * * From Table 8 of the Appendix, t=3.499 when n-1=7 and SIGMA/2=0.005 * GEN1 N=8 GEN1 LOWER=DBAR-((3.499*SD)/SQRT(N)) GEN1 UPPER=DBAR+((3.499*SD)/SQRT(N)) PRINT LOWER UPPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.10, p. 287 * * The independent random sample of information systems professors is IS, * the mean time ISMEAN, and the standard deviation is ISTD. * GEN1 IS=321 GEN1 ISMEAN=3.01 GEN1 ISTD=1.09 * * The independent random sample of accounting professors is ACC, the * mean rating is AMEAN, and the standard deviation per month is ASTD. * GEN1 ACC=94 GEN1 AMEAN=2.88 GEN1 ASTD=1.01 * * The 95% Confidence Interval for the difference between the two population * means is calculated with the GEN1 command. The Lower Bound is defined as * LOWER and the Upper Bound is defined as UPPER. * GEN1 LOWER=(ISMEAN-AMEAN)-1.96*(SQRT(((ISTD**2)/IS)+((ASTD**2)/ACC))) GEN1 UPPER=(ISMEAN-AMEAN)+1.96*(SQRT(((ISTD**2)/IS)+((ASTD**2)/ACC))) PRINT LOWER UPPER * DELETE / ALL *----------------------------------------------------------------------------- * Example 8.11, p. 289 * * In this example, the sample sizes of the amounts paid by residents for * speeding tickets in Orange City and DeLand are not identical. In Orange * City, the sample consists of 10 tickets while in DeLand the sample consists * of 8 tickets. Therefore, it is necessary to a separate SAMPLE and READ * commands for each of the cities to read in the data. * SAMPLE 1 10 READ ORANGE / LIST 100 125 135 128 140 142 128 137 156 142 * * The STAT command and MEAN= option is used to save the mean cost of * speeding tickets in Orange City and the VAR= option saves the sample * variance. * GEN1 NX=10 STAT ORANGE / MEAN=XBAR VAR=SX2 PRINT NX XBAR SX2 SAMPLE 1 8 READ DELAND / LIST 95 87 100 75 110 105 85 95 * * The STAT command and MEAN= option is used to save the mean cost of * speeding tickets in DeLand and the VAR= option saves the sample * variance. * GEN1 NY=8 STAT DELAND / MEAN=YBAR VAR=SY2 PRINT NY YBAR SY2 * * The pooled sample variance is calculated with the GEN1 command. * GEN1 SP2=(((NX-1)*SX2)+((NY-1)*SY2))/(NX+NY-2) PRINT SP2 * * The 95% Confidence Interval for the difference in the mean cost of * speeding tickets in these two cities is calculated with the GEN1 command. * The Lower Bound is defined as LOWER and the Upper Bound is defined as * UPPER. * * From Table 8 of the Appendix, t(16,0.025)=2.12 * GEN1 LOWER=(XBAR-YBAR)-2.12*SQRT((SP2/NX)+(SP2/NY)) GEN1 UPPER=(XBAR-YBAR)+2.12*SQRT((SP2/NX)+(SP2/NY)) PRINT LOWER UPPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.12, 291 * * The sample mean, size and standard deviation of the accounts payable for * the East Office is XBAR, NX and SX. The sample mean, size and standard * deviation of the accounts payable for the West Office is YBAR, NY and SY. * GEN1 XBAR=290 GEN1 NX=16 GEN1 SX=15 GEN1 YBAR=250 GEN1 NY=11 GEN1 SY=50 * * Calculate the degrees of freedom using the GEN1 command. The "&" symbol * is used to tell SHAZAM that the command continues to the next line. * GEN1 V=((((SX**2)/NX)+((SY**2)/NY))**2)/((((SX**2)/NX)**2/(NX-1))+(((SY**2)& /NY)**2/(NY-1))) PRINT V * * The 95% Confidence Interval for the difference between the mean values * of the accounts payables for the two offices is calculated with the GEN1 * command. The Lower Bound is defined as LOWER and the Upper Bound is * defined as UPPER. * * From Table 1 of the Appendix, t(12,0.025)=2.179 * GEN1 LOWER=(XBAR-YBAR)-2.179*(SQRT(((SX**2)/NX)+((SY**2)/NY))) GEN1 UPPER=(XBAR-YBAR)+2.179*(SQRT(((SX**2)/NX)+((SY**2)/NY))) PRINT LOWER UPPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.13, p. 294 * * The random sample of registered voters in Precinct A is NA and the number * in Precinct A that supported the candidate in question is VOTEA. The * independent random sample of registered voters in Precinct B is NB and the * number in Precinct B that supported the candidate in question is VOTEB. * GEN1 NA=120 GEN1 VOTEA=107 GEN1 PA=VOTEA/NA PRINT NA VOTEA PA GEN1 NB=141 GEN1 VOTEB=73 GEN1 PB=VOTEB/NB PRINT NB VOTEB PB * * The 95% Confidence Interval for the difference between population * proportions is calculated with the GEN1 command. The "&" command * is to continue the GEN1 command onto the following line. The Lower Bound * is called LOWER and the Upper Bound is called UPPER. * GEN1 LOWER=(PA-PB)-1.96*SQRT(((PA*(1-PA))/NA)+((PB*(1-PB))/NB)) GEN1 UPPER=(PA-PB)+1.96*SQRT(((PA*(1-PA))/NA)+((PB*(1-PB))/NB)) PRINT LOWER UPPER * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.14, p. 297 * * The sample size required to achieve a 99% Confidence Interval extending no * further than 0.50 mm on each side of the sample mean is defined as N using * the GEN1 command. * GEN1 B=0.50 GEN1 SIGMA=1.8 GEN1 Z005=2.576 GEN1 N=((Z005**2)*(SIGMA**2))/(B**2) PRINT N * *---------------------------------------------------------------------------- * Example 8.15, p. 299 * * The sample size required to achieve a 95% Confidence Interval for the * proportion of graduate admissions personnel recruiters who viewed scores * on standardized exams as very important in the consideration of a candiate * extends no further than 0.06 on each side of the sample proportion is * defined as N using the GEN1 command. * GEN1 B=0.06 GEN1 Z025=1.96 GEN1 N=(0.25*Z025**2)/B**2 PRINT N * DELETE / ALL *---------------------------------------------------------------------------- * Example 8.16, p. 300 * * The sample sized required to achieve a 95% Confidence Interval for the * number of citizens of voting age need to obtain a 3% margin of error is * defined as N using the GEN1 command. * GEN1 B=0.03 GEN1 Z025=1.96 GEN1 N=(0.25*Z025**2)/B**2 PRINT N * DELETE / ALL *---------------------------------------------------------------------------- STOP