***************************************************************************** * CHAPTER 6 - STATISTICS FOR BUSINESS & ECONOMICS, 5th Edition * ***************************************************************************** * Example 6.1, p, 183 * GEN1 FX0=0.50 GEN1 FRACTURE=(FX0*1.5)-(FX0*0.5) PRINT FRACTURE * DELETE / ALL * *---------------------------------------------------------------------------- * Example 6.2, p. 186 * * Based on the formula, the values for A, B, MEANT and STD are defined. * GEN1 A=290 GEN1 B=-5 GEN1 MEANT=24 GEN1 SIGMA=4 * * Expected Heating Bill (HEATBILL). * GEN1 HEATBILL=A+(B*MEANT) * * The variance for the Heating Bill (VARBILL) is calculated. The standard * deviation (STDBILL) is the square root of VARBILL. * GEN1 VARBILL=(B**2)*(SIGMA**2) GEN1 STDBILL=ABS(B)*SIGMA PRINT HEATBILL VARBILL STDBILL * DELETE / ALL * *---------------------------------------------------------------------------- * Example 6.3, p. 191 * * Where: * MEAN = Mean Value of the investment portfolio * STD = Standard Deviation of the investment portfolio * GEN1 MEAN=500000 GEN1 STD=15000 GEN1 A=485000 GEN1 B=530000 * * Calculate the Z value for the portfolio at $485,000 and $530,000. * GEN1 Z485=(A-MEAN)/STD GEN1 Z530=(B-MEAN)/STD PRINT Z485 Z530 * * The probability that Z, PZ, is between -1 and 2 is calculated using the * GEN1 command. From Table 1 of the Appendix, Fz(2)=0.9772 and Fz(1)=0.8413. * Therefore, Fz(-1)=1-Fz(1). * GEN1 FZ2=0.9772 GEN1 FZ1=0.8413 GEN1 FZM1=1-FZ1 GEN1 PZ=(1-FZM1)-(1-FZ2) PRINT PZ * * Alternatively, you can use the GEN1 and DISTRIB commands to print out * values in lieu of referring to a statistical table. The format * of the DISTRIB command is: * * DISTRIB vars / options * * where: vars = list of variables * options = list of desired options * TYPE= - specifies the type of distribution * MEAN= - specifies mean * VAR= - specifies the variance * GEN1 X1=485000 GEN1 X2=530000 GEN1 SIG2=15000**2 DISTRIB X1 / TYPE=NORMAL MEAN=500000 VAR=SIG2 GEN1 CDF1=$CDF DISTRIB X2 / TYPE=NORMAL MEAN=500000 VAR=SIG2 GEN1 CDF2=1-$CDF GEN1 Z=1-CDF1-CDF2 PRINT Z * DELETE / ALL *---------------------------------------------------------------------------- * Example 6.4, p. 193 * * The probability that X is larger than 18 is calculated using the GEN1 * command. * GEN1 X=18 GEN1 MEAN=15 GEN1 SIGMA2=16 GEN1 SIGMA=SQRT(SIGMA2) GEN1 FZ=(X-MEAN)/SIGMA PRINT FZ * * From Table 1 of the Appendix, Fz(0.75)=0.7734. * GEN1 F75=0.7734 GEN1 PX=1-F75 PRINT PX * GEN1 X=15 GEN1 SIG2=4**2 DISTRIB X / TYPE=NORMAL MEAN=18 VAR=SIG2 PRINT $CDF * DELETE / ALL *---------------------------------------------------------------------------- * Example 6.5, 193 * * The probability that the lightbulb's lifetime will between 900 and 1300 * hours is calculated using the GEN1 command. * GEN1 MEAN=1200 GEN1 SIGMA=250 GEN1 X1=900 GEN1 X2=1300 GEN1 P900=(X1-MEAN)/SIGMA GEN1 P1300=(X2-MEAN)/SIGMA PRINT P900 P1300 * * From Table 1 of the Appendix, Fz(0.4)=0.6554 and Fz(-1.2)=0.8849. * GEN1 F4=0.6554 GEN1 FNEG12=0.8849 GEN1 PX=F4-(1-FNEG12) PRINT PX * GEN1 X1=900 GEN1 SIG2=250**2 DISTRIB X1 / TYPE=NORMAL MEAN=1200 VAR=SIG2 GEN1 CDF1=1-$CDF GEN1 X2=1300 DISTRIB X2 / TYPE=NORMAL MEAN=1200 VAR=SIG2 GEN1 CDF2=$CDF GEN1 Z=CDF1-(1-CDF2) PRINT Z * DELETE / ALL *---------------------------------------------------------------------------- * Example 6.6, p. 193 * * The probability that a portion of the students obtained test scores between * 85 and 95 is calculated using the GEN1 command. * GEN1 MEAN=60 GEN1 SIGMA=15 GEN1 SCORE1=85 GEN1 SCORE2=95 GEN1 P85=(SCORE1-MEAN)/SIGMA GEN1 P95=(SCORE2-MEAN)/SIGMA PRINT P85 P95 * * From Table 1 of the Appendix, Fz(2.33)=0.9901 and Fz(1.67)=0.9525. * GEN1 F233=0.9901 GEN1 F167=0.9525 GEN1 PX=F233-F167 PRINT PX * GEN1 X1=85 GEN1 VAR=15**2 DISTRIB X1 / TYPE=NORMAL MEAN=60 VAR=VAR GEN1 CDF1=$CDF GEN1 X2=95 DISTRIB X2 / TYPE=NORMAL MEAN=60 VAR=VAR GEN1 Z=$CDF-CDF1 PRINT Z * DELETE / ALL *---------------------------------------------------------------------------- * Example 6.7, p. 194 * * The cutoff point for the top 10% of all students from Example 6.6 is * calculated using the GEN1 command. * GEN1 P=0.10 GEN1 MEAN=60 GEN1 SIGMA=15 GEN1 Z=1.28 GEN1 B=(Z*SIGMA)+MEAN PRINT B * DELETE / ALL *---------------------------------------------------------------------------- * Example 6.8, p. 202 * * The probability that between 45 to 50 homes visits will result if he * contacts 100 people by telephone is calculated using the GEN1 command. * Approximate the binomial probability without using the continuity * correction is done first. * GEN1 A=45 GEN1 B=50 GEN1 N=100 GEN1 P=0.40 GEN1 LOWERB=(A-N*P)/(SQRT(N*P*(1-P))) GEN1 UPPERB=(B-N*P)/(SQRT(N*P*(1-P))) PRINT LOWERB UPPERB * * From Table 1 of the Appendix, Fz(2.04)=0.9793 and Fz(1.02)=0.8461. * GEN1 F204=0.9793 GEN1 F102=0.8461 GEN1 PX=F204-F102 PRINT PX * * The output below shows the true Binomial Probabilities. * GEN1 X=45 DISTRIB X / TYPE=BINOMIAL N=100 P=0.40 GEN1 CDF45=$CDF GEN1 X2=50 DISTRIB X2 / TYPE=BINOMIAL N=100 P=0.40 GEN1 BP=$CDF-CDF45 PRINT BP * * In the textbook, the approximate Binomial Probabilities is calculated * using the Normal Distribution. * GEN1 N=100 GEN1 P=0.40 GEN1 MEAN=N*P GEN1 SIGMA2=(SQRT((N*P)*(1-P)))**2 DISTRIB X / TYPE=NORMAL MEAN=MEAN VAR=SIGMA2 GEN1 CDFN45=$CDF DISTRIB X2 / TYPE=NORMAL MEAN=MEAN VAR=SIGMA2 GEN1 BP2=$CDF-CDFN45 PRINT BP2 * DELETE / ALL *---------------------------------------------------------------------------- * Example 6.9, p. 203 * GEN1 N=900 GEN1 PP=0.50 GEN1 MEAN=450 GEN1 VAR=225 * * Probability that 500 or more voters out of a sample of 900 support Susan * given the assumption that exactly 50% of the entire population supports * Susan. * GEN1 PZ1=(500-MEAN)/SQRT(VAR) PRINT PZ1 * * The second method calculates the probability that more than 55.6% of the * sample indicate support for Susan using the mean and variance for * proportion random variables. * GEN1 VAR2=(PP*(1-PP))/N GEN1 STD=SQRT(VAR2) GEN1 NN=500/N GEN1 PZ2=(NN-PP)/STD PRINT STD NN PZ2 * GEN1 X=500 DISTRIB X / TYPE=NORMAL MEAN=450 VAR=225 * DELETE / ALL *---------------------------------------------------------------------------- * Example 6.10, p. 205 * * The probability that the customer service will take longer than 10 minutes. * GEN1 PX=EXP(-2) PRINT PX * GEN1 X=10 DISTRIB X / TYPE=EXPONENTIAL MEAN=5 * DELETE / ALL *--------------------------------------------------------------------------- * Example 6.11, p. 206 * * The probability that time between accidents is less than two weeks. * GEN1 F2=1-EXP(-0.8) PRINT F2 * GEN1 X=2 DISTRIB X / TYPE=EXPONENTIAL MEAN=2.5 * DELETE / ALL *---------------------------------------------------------------------------- * Example 6.12, p. 209 * * The variable X1=materials cost and X2=labor costs. * GEN1 LABOR=1500 GEN1 MDAYS=80 GEN1 SIGMAL=12 GEN1 MEAN1=100000 GEN1 SIGMA1=10000 GEN1 MEAN2=LABOR*MDAYS GEN1 SIGMA2=LABOR*SIGMAL * * Total Project Cost(TCOST), Variance (VAR) and Standard Deviation (STD) is: * GEN1 TCOST=MEAN1+MEAN2 GEN1 VAR=(SIGMA1**2)+(SIGMA2**2) GEN1 STD=SQRT(VAR) PRINT TCOST VAR STD * DELETE / ALL *---------------------------------------------------------------------------- * Example 6.13, p. 209 * * Read this example carefully. Be sure you understand the methodology. * *---------------------------------------------------------------------------- * Example 6.14, p. 210 * * The probability that the portfolio value exceeds $2000 is calculated * using the GEN1 command. The "&" symbol is used to tell SHAZAM that * the command continues to the next line. * GEN1 A=20 GEN1 B=30 GEN1 MEANX=25 GEN1 SIGMA2X=81 GEN1 MEANY=40 GEN1 SIGMA2Y=121 GEN1 CORXY=-0.40 GEN1 MEANW=20*MEANX+30*MEANY GEN1 SIGMA2=(20**2)*SIGMA2X+(30**2)*SIGMA2Y+2*A*B*CORXY*(SQRT(SIGMA2X))*& (SQRT(SIGMA2Y)) GEN1 SIGMA=SQRT(SIGMA2) GEN1 Z=(2000-MEANW)/SIGMA PRINT MEANW SIGMA2 Z * * The probability that the portfolio value exceeds 2000 is calculated with * the GEN1 command. From the Table 1 of the Appendix, Fz(0.98)=0.8365. * GEN1 F98=0.8365 GEN1 P2000=1-F98 PRINT P2000 * * If the two stock prices had a positive correlation then the mean, variance * and standard deviation calculations are: * GEN1 CORXY2=0.40 GEN1 MEANW=20*MEANX+30*MEANY GEN1 SIGMA2=(20**2)*SIGMA2X+(30**2)*SIGMA2Y+2*A*B*CORXY2*(SQRT(SIGMA2X))*& (SQRT(SIGMA2Y)) GEN1 SIGMA=SQRT(SIGMA2) GEN1 Z=(2000-MEANW)/SIGMA PRINT MEANW SIGMA2 SIGMA Z * * The probability that the portfolio value exceeds 2000 is calculated with * the GEN1 command. From the Table 1 of the Appendix, Fz(0.69)=0.7549. * GEN1 F69=0.7549 GEN1 P2000=1-F69 PRINT P2000 * GEN1 X=2000 GEN1 SIG2=434.53**2 DISTRIB X / TYPE=NORMAL MEAN=1700 VAR=SIG2 * *--------------------------------------------------------------------------- STOP