Chapter 3 - STATISTICS FOR BUSINESS & ECONOMICS by Paul Newbold
```*****************************************************************************
* CHAPTER 3 - STATISTICS FOR BUSINESS & ECONOMICS, 4th Ed., by Paul Newbold *
*****************************************************************************
*
* Example 3.1, page 76 to Example 3.7, page 82
*
* Read these sections and examples carefully.  Be sure you understand
* the methodology.
*
*----------------------------------------------------------------------------
* Example 3.8, page 88
*
* The GEN1 command is used to generate the constants.  Where:
*
*    TICKETS  = Total lottery tickets
*    MAJOR    = Major prizes to be won
*    MINOR    = Minor prizes to be won
*    PA       = Selected Ticket wins Major Prize
*    PB       = Selected Ticket wins Minor Prize
*    PAUB     = Ticket wins Some Prize
*
GEN1 TICKETS=1000
GEN1 MAJOR=10
GEN1 MINOR=100
GEN1 PA=MAJOR/TICKETS
GEN1 PB=MINOR/TICKETS
GEN1 PAUB=PA+PB
PRINT PA PB PAUB
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.9, page 88
*
* The GEN1 command is used to generate the constants.  Where:
*
*    O1  = Average rises on both days
*    O2  = Average rises on first day but does not rise on second day
*    O3  = Average does not rise on first day but does rise on second day
*    O4  = Average does not rise on either day
*    PO1 = Event O1 occurring
*    PO2 = Event O2 occurring
*    PO3 = Event O3 occurring
*    PO4 = Event O4 occurring
*    PM  = Market rises on at least one day of the two days
*
GEN1 O1=1
GEN1 O2=1
GEN1 O3=1
GEN1 O4=1
GEN1 TOTAL=O1+O2+O3+O4
GEN1 PO1=O1/TOTAL
GEN1 PO2=O2/TOTAL
GEN1 PO3=O3/TOTAL
GEN1 PO4=O4/TOTAL
GEN1 PM=PO1+PO2+PO3
PRINT PM
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.10, page 89
*
* The GEN1 command is used to generate the constants.  Where:
*
*    PA   = Recoverable Reserves exceeds 2 Billions Barrels
*    PAUB = Recoverable Reserves exceeds 1 Billion Barrels
*    PB   = Recoverable Reserves between 1 and 2 Billion Barrels
*
GEN1 PA=0.1
GEN1 PAUB=0.5
GEN1 PB=PAUB-PA
PRINT PB
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.11, page 92 to Example 3.15, page 95
*
* Read these sections and examples carefully.  Be sure you understand
* the methodology.
*
*----------------------------------------------------------------------------
* Example 3.16, page 96
*
* The GEN1 command is used to generate the constant.  Where:
*
*    PA    = No women are selected
*    PABAR = At least one woman is selected
*
GEN1 PA=1/14
GEN1 PABAR=1-PA
PRINT PABAR
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.17, page 97
*
* The GEN1 command is used to generate the constant.  Where:
*
*    PA   = All customers use mustard
*    PB   = All customers use ketchup
*    PANB = All customers use both
*    PAUB = A particular customer will use at least mustard or ketchup
*
GEN1 PA=0.75
GEN1 PB=0.80
GEN1 PANB=0.65
GEN1 PAUB=PA+PB-PANB
PRINT PAUB
*
*----------------------------------------------------------------------------
* Example 3.18, page 99
*
* Where:
*
*    PACB = A ketchup user uses mustard
*    PBCA = A mustard user uses ketchup
*
GEN1 PACB=PANB/PB
GEN1 PBCA=PANB/PA
PRINT PACB PBCA
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.19, page 99
*
* The GEN1 command is used to generate the constants.  Where:
*
*    PA    = Respondent answered "yes"
*    PE1   = Respondent answered question (a)
*    PE2   = Respondent answered question (b)
*    PACE1 = A "Yes" answer given in question (a) has been answered
*    PACE2 = A "Yes" answer given in question (b) has been answered
*
GEN1 PA=0.37
GEN1 PE1=0.50
GEN1 PE2=0.50
GEN1 PACE1=0.50
GEN1 PACE2=(PA-(PACE1*PE1))/PE2
PRINT PACE2
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.20, page 101
*
* The GEN1 command is used to generate the constants.  Where:
*
*    PA   = All bachelor's degrees obtained by women
*    PB   = All bachelor's degrees are in business
*    PANB = All bachelor's degrees go to women majoring in business
*    PAPB = Bachelor's degree holder is a woman and Bachelor's degree
*    PACB = Business degrees go to women
*
GEN1 PA=0.48
GEN1 PB=0.175
GEN1 PANB=0.047
GEN1 PAPB=PA*PB
GEN1 PACB=PANB/PB
PRINT PAPB PACB
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.21, page 102
*
* The GEN1 command is used to generate the constants.  Where:
*
*    PEi     = Computer works for at least 1 year before repair is needed
*              (where i=1,2,3)
*    PE1E2E3 = All 3 computers will work for a year before any repair is
*              required
*
GEN1 PE1=0.90
GEN1 PE2=0.90
GEN1 PE3=0.90
GEN1 PE1E2E3=PE1*PE2*PE3
PRINT PE1E2E3
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.22, page 102
*
* The GEN1 command is used to generat the constants.  Where:
*
*    PE1    = Dow-Jones average will rise on Day 1
*    PE2    = Dow-Jones average will rise on Day 2
*    PE3    = Dow-Jones average will rise on Day 3
*    PE4    = Dow-Jones average will rise on Day 4
*    PE1234 = Market will rise on all 4 days
*    PFALL  = Dow-Jones average will fall or remain constant on at least
*             one of these days
*
GEN1 PE1=0.50
GEN1 PE2=0.50
GEN1 PE3=0.50
GEN1 PE4=0.50
GEN1 PE1234=PE1*PE2*PE3*PE4
GEN1 PFALL=1-PE1234
PRINT PE1234 PFALL
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.23, page 103
*
* Read this example carefully.  Be sure you understand the methodology.
*
*----------------------------------------------------------------------------
* Example 3.24, page 104
*
SAMPLE 1 300
GENR M=TIME(0)
GENR P=1-(324/325)**M
PRINT M P
*
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.25, page 115
*
* The GEN1 command is used to generate the constants.  Where:
*
*    PERROR  = Auditor finds that 15% of a corporation's account balances
*              contain errors
*    PUCERR  = Of those balances in error, these were regarded as unusual
*              values based on historical figures
*    PUNUSL  = Of all account balances, these were unusual values
*    PERCUN  = Unusual figures on account balance is an error
*
GEN1 PERROR=0.15
GEN1 PUCERR=0.60
GEN1 PUNUSL=0.20
GEN1 PERCUN=(PUCERR*PERROR)/PUNUSL
PRINT PERCUN
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.26, page 116
*
* The GEN1 command is used to generate the constants.  Where:
*
*    PAREC = A Professor who received the material adopted the book
*            material
*
GEN1 PREC=0.80
GEN1 PDNR=1-PREC
GEN1 PAREC=0.30
PRINT PAREC
DELETE / ALL
*
*----------------------------------------------------------------------------
* Example 3.27, page 117
*
* The GEN1 command is used to generate the constants.  Where:
*
*    PE1  = Stock performs much better than the market average
*    PE2  = Stock performs about the same as market average
*    PE3  = Stock performs much worse than market average
*    PA   = Stock is rated "good buy" by the analyst
*    PAE1 = Stocks turned out to do much better than the market that were
*           rated "good buys" by the analyst
*    PAE2 = Stocks did as well as the market
*    PAE3 = Stocks did much worst than the market
*    PE1A = Stock performs much better than the market average, given that
*           it was rated a "good buy" by the analyst
*
GEN1 PE1=0.25
GEN1 PE2=0.50
GEN1 PE3=0.25
GEN1 PAE1=0.40
GEN1 PAE2=0.20
GEN1 PAE3=0.10
GEN1 PE1A=(PAE1*PE1)/((PAE1*PE1)+(PAE2*PE2)+(PAE3*PE3))
PRINT PE1A
DELETE / ALL
*
*----------------------------------------------------------------------------
STOP
```