Professional Documents
Culture Documents
Solution procedure:
1.Problem
2.Data
3.program
23 November 2016
Statistical operations
Calculate numerical summaries such as
1.1.1. average
1.1.2. standard deviation and
1.1.3. third quartile for all numerical variables
sd
cv n
50%
75%
100% n
Total
Contingency summaries
Two-way table
Frequency table:
Region
Item
Binder
Desk
Pen
Pen Set
Pencil
3
4
1
3
0
2
with(company, (t.test(price,
alternative='two.sided', mu=65,
conf.level=.95)))
One Sample t-test
data: price
t = 2.8247, df = 9, p-value = 0.01989
alternative hypothesis: true mean is not equal
to 65
95 percent confidence interval:
65.49785 69.50215
sample estimates:
mean of x
67.5
p<alphareject
p>alphaaccept
therefore hypothesis is rejected.
salesm
en
A
quanti
ty
300
400
300
500
600
300
300
400
700
300
400
600
100
50
sd data:n
A 320 148.3240
B 400 141.4214
C 410 255.9297
30/11
(One-sample) T-test:
H0: u=45
> with(ttest, (t.test(X,
alternative='two.sided', mu=45,
conf.level=.95)))
One Sample t-test
data: X
t = -0.26464, df = 9, p-value = 0.7972
alternative hypothesis: true mean is not
equal to 45
95 percent confidence interval:
36.40682 51.79318
sample estimates:
mean of x
44.1
Therefore Hypothesis is accepted
i.e..,u=45
with(sales,
(t.test(before,
alternative='two.sided', conf.level=.95,
after,
+ paired=TRUE)))
Paired t-test
data: before and after
t = -1.6503, df = 7, p-value = 0.1429
alternative hypothesis: true difference in means is
not equal to 0
95 percent confidence interval:
-6.690337 1.190337
sample estimates: