In: Statistics and Probability
CH 10.
1.
The USA Today reports that the average expenditure on Valentine's Day is $100.89. Do male and female consumers differ in the amounts they spend? The average expenditure in a sample survey of 46 male consumers was $135.67, and the average expenditure in a sample survey of 34 female consumers was $68.64. Based on past surveys, the standard deviation for male consumers is assumed to be $38, and the standard deviation for female consumers is assumed to be $20.
2
Bank of America's Consumer Spending Survey collected data on annual credit card charges in seven different categories of expenditures: transportation, groceries, dining out, household expenses, home furnishings, apparel, and entertainment (U.S. Airways Attache, December 2003). Using data from a sample of 42 credit card accounts, assume that each account was used to identify the annual credit card charges for groceries (population 1) and the annual credit card charges for dining out (population 2). Using the difference data, the sample mean difference was = $827, and the sample standard deviation was sd= $1,151.
|
##Using R codes :
> ##1)
> mu=100.89
> nm=46;xm=135.67;nf=34;xf=68.64
> sm=38;sf=20
> #a) Point estimate of difference between population mean
expenditure for males & population mean expenditure for females
is
> PE=xm-xf;PE
[1] 67.03
> #b) Margin of error
> ME=round(qnorm(0.99)*sqrt((sm^2/nm)+(sf^2)/nf),2);ME
[1] 15.28
> #c) 99% C.I.
> c(PE-ME,PE+ME)
[1] 51.75 82.31
> ##2)
> n=42
> md=827
> sd=1151
> #a) Null & alternative hypotheses to test for no
difference between the population mean credit card charges for
groceries and the population mean credit card charges for dining
out.
> #H0 : equal to 0 v/s Ha : not equal to 0
> #b)
> ts=md/(sd/sqrt(n));ts #test statistic
[1] 4.656449
> ttab=qnorm(0.95);ttab #table value
[1] 1.644854
> ##ts>ttab, reject H0 at 5 % l.o.s.
> pval=1-pnorm(ts);pval #p-value
[1] 1.608551e-06
> ##So, p-value < 0.01.
> ## Reject H0 at 5 % l.o.s.
> ##There is a difference between the annual mean
expenditures.
> #c)
> ## The point estimate of the difference between the population
means is md=827
> ##95% C.I.estimate of the difference between the population
means is
>
c(md-(qnorm(0.95)*sd/sqrt(n)),md+(qnorm(0.95)*sd/sqrt(n)))
[1] 534.8688 1119.1312