Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A newspaper claimed that difficulty with sleeping is associated with depression. To test this hypothesis, you recruit a random sample of second year undergraduate students

  1. A newspaper claimed that difficulty with sleeping is associated with depression. To test this hypothesis, you recruit a random sample of second year undergraduate students and obtain information on difficulty with sleeping ('Slp_Trouble') and depression status ('Depressed'). Conduct an appropriate statistical test to examine the association between the sleep trouble and depression. Significance is set at 0.05 for a two-tail test. (14 Marks)

Note: Depressed: 1 = Excellent, 2 = Good, 3 = Fair, 4 = Poor

Slp_Trouble: 0 = No, 1 = Yes

Provide all R codes used to answer this question:

Provide null and alternative hypotheses:

Is the assumption/requirement for this statistical test met? Explain:

Test statistic value:

P-value:

Based on the p-value, do you reject or fail to reject the null hypothesis? Explain

data:

ID

Sex

Age

Weight

Height

Alcohol_Use

TimetoSleep

Time_Getup

Sleep_Hours

Sleep_Quality

Slp_Trouble

Concentration

Depressed

Effort

Hopeful

Fearful

Happy

Lonely

96958

2

20

200

182

1

45

9

5

3

0

2

1

3

4

3

3

2

45859

2

30

119

158

0

15

7

6.5

2

0

1

2

3

3

1

3

1

17992

1

21

200

187

1

10

8

10

2

0

2

1

3

4

1

3

1

90751

2

19

170

160

1

3

6

7

2

0

1

1

1

2

3

3

3

87989

2

19

120

160

1

40

7.5

6

2

0

3

3

2

2

2

2

3

14335

2

19

180

168

1

20

8

5

2

0

3

2

2

2

2

3

1

6310692

1

21

174

195

0

7

6

7

2

0

1

1

1

1

1

3

3

43766

2

19

175

162

0

20

8

9

2

0

2

2

1

3

3

3

3

42788

2

20

135.8

165

1

30

10

5

4

0

2

1

3

4

3

4

2

65881

1

20

140

180

0

20

6

8

2

1

2

2

3

3

3

3

2

61556

1

27

190

180

1

30

7

7.5

1

1

2

1

2

3

1

3

1

6546204

2

19

120

165

1

45

8

8

2

1

3

2

2

2

2

3

2

70584

2

19

150

168

1

15

8

7

3

0

3

2

4

3

1

4

1

92786

2

24

130

158

0

15

8

7

1

0

2

4

3

2

2

2

2

94860

2

19

123

165

1

240

7.5

9

3

1

2

3

3

3

2

3

2

34732

1

18

189

183

1

60

12

9

3

0

4

1

4

4

3

3

1

95995

1

18

165

170

0

15

9

7

1

0

2

1

3

4

1

4

3

69567

1

20

160

180

0

30

5

7

2

0

1

1

3

3

3

3

1

6452361

1

20

180

183

1

30

7

7

2

0

3

1

3

4

1

4

1

43220

2

19

125

170

1

20

9

7

2

0

2

1

3

4

2

4

1

6403521

1

19

140

180.34

0

120

12

6

2

0

4

3

3

4

3

3

4

7100

1

19

200

182

1

45

7

6

2

0

3

1

2

3

1

4

1

34047

2

19

115

167

1

10

10

8

2

0

2

1

2

3

2

3

1

90676

2

19

125

165

1

10

9

8.5

2

0

1

1

1

2

2

3

2

27329

2

19

128

180

1

40

9

6

2

0

4

2

3

3

1

2

2

20019

1

19

183

182

1

30

8

6

2

0

2

1

1

4

1

3

1

14921

2

19

110

175

1

15

10

6

2

0

1

3

1

2

3

2

2

38235

1

19

164

186

1

15

6

5

2

0

2

2

2

3

4

3

4

31784

2

19

185

170.2

0

10

10

8

2

0

3

1

2

3

2

2

2

56552

2

19

118

160

0

5

5

7

2

0

1

1

3

4

2

3

2

69567

1

20

160

180

0

30

5

7

2

0

1

1

3

3

3

3

1

83934

2

19

60

157

0

60

9

6

2

0

3

1

3

3

2

3

2

6486955

2

19

119

160

1

20

10

9

1

1

2

1

3

4

2

4

2

16044

2

19

140

158

0

15

10

10

1

0

3

1

2

3

2

4

2

67302

2

20

174

183

1

15

15

7

1

0

3

1

4

4

1

4

2

72394

2

24

170

173

0

25

8

6

2

1

2

1

2

3

2

4

1

88305

2

19

110

157

0

45

10

7

3

1

2

3

2

3

2

3

2

20515

2

22

136

170

0

50

30

7

2

0

2

1

2

2

2

2

2

97594

2

20

154.32

168

0

20

9

7

2

0

2

1

2

3

1

3

1

39483

2

19

129

165

1

15

5

7

2

0

3

1

2

3

2

4

2

492581

1

19

158

178

0

420

8

8

2

0

2

2

3

3

2

2

3

87032

2

41

165

154.94

1

30

5

7

3

0

2

1

2

3

1

3

1

24998

2

19

135

162.5

0

20

5.5

5.5

2

0

2

1

1

2

1

4

1

70755

2

20

105

167

0

25

10

9

3

1

2

1

4

4

3

2

2

17894

2

25

174

160

1

60

10

5

2

0

2

2

2

1

3

3

3

33251

1

19

170

177.8

1

15

8

7

2

0

4

2

4

4

0

4

2

16843

1

20

130

170

0

20

9

7

2

0

3

1

2

3

1

3

2

41960

1

22

235.9

184

0

10

8

8

2

0

3

3

1

3

1

3

1

85707

2

19

118

174

1

30

9

7

3

0

3

4

3

2

3

2

3

22455

1

19

165

176

1

30

8

9

2

1

3

2

2

3

1

3

3

83063

2

20

124

154.94

0

20

8

7.5

2

1

2

3

1

2

2

3

3

26910

2

19

168

160.02

0

25

9

6.5

2

0

3

1

3

4

4

4

3

58590

1

19

185

189

1

30

12

7

4

1

2

4

4

1

3

2

2

80325

2

21

139

170

1

20

9

8

3

1

2

3

3

3

1

3

2

98954

1

19

145

182

1

45

11

7

3

1

4

3

3

1

4

2

4

6502819

2

19

147

177

1

30

9

8

1

0

2

2

3

3

2

3

2

69134

1

19

135

175

0

20

11

8

2

0

3

1

3

4

2

3

1

52478

2

19

110

161.5

1

30

13

10

2

0

3

1

1

3

1

4

1

26545

2

19

250

180

1

20

7

8

1

0

1

1

2

3

1

3

1

37628

2

19

108

155

1

20

7

7

3

0

3

3

3

3

3

3

3

6470900

1

19

230

190.5

1

30

9

8

2

0

1

3

2

1

3

2

3

6278022

2

20

135

161

0

30

6

7

2

0

4

1

2

3

2

3

2

46684

2

21

140

170.18

0

30

8

9

2

0

2

2

2

3

2

3

1

28874

2

19

125

167

0

10

8

8.5

1

0

2

1

1

3

1

4

1

16117

2

21

150

168

1

25

10

8

2

0

3

2

3

3

2

3

1

20137

2

19

161

170.18

1

45

10

5

2

0

2

1

2

1

2

3

3

6465298

2

19

130

160

1

20

10

9

2

0

3

1

3

5

2

6

2

22729

2

19

145

170

1

90

8

5

2

0

2

2

2

3

2

4

3

88423

2

19

135

165

0

20

8

7

2

1

2

3

3

2

4

3

3

73227

2

22

112

158

0

40

8

8

2

0

2

2

2

3

2

3

1

92229

2

19

160

165

0

45

8

6

3

0

2

1

2

3

2

3

2

87240

1

20

137

170

0

20

4

6

2

0

3

1

2

2

1

3

1

3539

2

19

185

165.1

1

15

8

7

2

0

1

3

4

4

2

2

1

3387

2

19

126

162

0

30

9

9

1

0

2

1

4

3

2

4

1

77899

2

21

145

175

1

30

10

8

1

0

2

3

1

2

2

0

3

71841

1

19

200

190

1

30

12

5

2

1

4

1

1

4

1

4

1

0.8637

2

20

200

173

1

30

9

5

2

0

2

2

2

3

2

4

3

69235

1

19

135

178

0

15

9

5

2

0

2

2

1

1

2

2

3

31859

1

20

185

193

1

20

11

5

2

0

2

2

0

3

0

3

0

55307

2

19

112

163

1

30

10

8

2

0

1

1

1

3

2

2

2

75933

2

19

150

167

1

30

9

5

2

0

1

1

3

3

3

3

2

31859

1

20

185

193

1

20

11

4

2

0

2

2

0

3

0

3

0

33320

2

19

140

162

1

15

8

9

2

0

1

1

2

2

1

4

1

90731

2

17

120

163

0

10

6

8

2

0

1

1

3

4

2

3

3

1673

1

20

160

180

0

10

8

5

2

0

2

2

4

4

4

2

3

35614

2

19

118

160

0

10

10

11

3

0

1

1

2

3

4

4

1

4963

2

19

150

152

0

10

6

5

2

0

1

4

3

2

3

3

2

6488472

2

20

150

160.2

1

30

9

6

2

0

2

3

2

3

2

3

2

46402

1

20

145

173

0

300

8

5

2

0

4

1

4

3

4

3

1

52988

2

19

123

161

0

2

9

8

2

0

2

3

2

2

4

3

2

58889

2

19

150

165

1

30

11

7.5

2

0

3

1

3

3

3

3

2

345

2

19

128

160

0

15

10

10

2

0

2

1

3

4

2

4

1

15855

2

19

212

165

0

30

8

8

2

0

3

1

3

4

3

4

1

91515

2

19

129

171

0

45

8

9

1

0

2

1

2

4

2

4

2

88081

2

20

135

168

1

30

9

7

3

0

2

1

2

3

3

4

1

32477

1

19

160

185

0

10

9

8

1

0

1

1

1

4

1

4

1

35101

2

19

105

162

0

10

9

7

2

0

1

1

1

7

1

7

2

9783

2

19

140

157

1

15

7

8

2

0

1

1

2

3

1

3

1

90866

2

19

185

173

0

5

10

7

1

0

3

1

4

4

2

4

1

76162

2

19

180

170

0

15

6

6

1

0

3

2

2

3

3

2

2

5192

1

19

180

209

1

15

9

8

2

0

1

1

2

3

1

4

2

69654

2

19

115

165

0

20

11

6

3

1

3

2

2

3

3

2

2

23347

1

20

167

180

1

20

5

7

2

1

2

3

4

3

1

3

3

26297

1

19

172

182.88

1

30

9

7

2

0

4

2

3

1

1

4

1

82449

2

19

116

166

1

20

0.395833333

6

2

0

3

1

2

4

2

4

2

92257

2

20

99

165

0

15

8

8

1

1

2

3

4

3

4

3

4

96857

2

19

98

157

0

40

9

8

2

0

4

4

2

1

3

1

2

6472479

1

19

172

155.4

0

6

6

5

1

0

1

1

1

1

1

4

1

6582811

2

20

100

165

1

10

0.375

7

1

0

2

1

2

1

3

3

2

2267

2

19

155

171

1

50

8

6

2

1

2

4

3

2

4

4

1

95115

2

19

125

158

1

45

9

7

2

0

4

1

4

2

2

3

3

22158

1

19

170

185

1

30

9

7.5

2

0

2

1

2

2

1

4

1

48377

2

19

120

164

1

5

7

8

2

0

4

2

4

3

2

4

2

97421

1

19

198

185

0

15

7

8

2

0

2

2

3

4

1

3

2

65631

1

21

150

165

0

15

6

6

1

0

1

1

1

4

2

4

1

22213

1

19

215

5.95

1

25

0.302083333

7

0

0

2

2

3

2

3

1

3

6444186

1

19

150

172

1

30

9

6.5

2

1

4

1

4

4

2

3

1

30540

2

19

117

152.4

1

10

8

8

2

0

3

1

3

2

3

4

1

79521

1

19

210

182

1

15

9

8

2

0

2

1

3

3

2

4

2

99021

2

19

99

161

0

15

8

7

2

0

2

1

2

3

2

3

2

50050

2

19

110

160

0

30

0.354166667

8

2

1

4

2

3

2

3

3

2

40390

2

19

105

150

1

30

8

8

2

0

2

3

2

3

3

3

2

90876

2

19

128

168

1

30

0.333333333

7.5

1

0

2

1

2

3

2

4

1

461503

1

19

185

180

0

360

7

7

2

0

3

1

2

3

1

4

1

63293

2

19

170

167.6

1

30

10

6

2

1

4

2

4

4

2

3

2

34260

2

19

117

163.83

1

5

9

8

2

0

3

2

3

2

2

3

3

5721

2

19

189

154

1

20

7

7

2

0

1

1

1

4

1

4

2

91713

2

19

150

175.26

1

45

10

6

2

0

1

1

2

2

1

3

2

28569

2

19

115

155

1

45

9

9

2

0

2

1

1

4

2

4

3

96012

1

19

160

187.96

1

7

9

5

2

0

3

1

1

3

2

3

1

85280

2

19

165

167

1

45

7

6

2

0

3

1

1

4

3

4

2

2751

2

19

175

167

1

15

7

6

2

1

4

1

1

3

1

3

1

20798

2

19

125

170

1

45

10

9

3

0

3

2

3

4

2

4

3

6443006

2

19

100

164

1

10

9

10

1

0

3

2

3

3

2

3

2

6513238

2

19

170

173

1

15

7

5

2

0

2

1

3

2

4

2

3

93755

2

19

115

167

1

20

7

9

1

0

2

1

2

4

1

4

1

82498

1

22

195

183

1

45

7

5

2

0

3

2

2

3

1

3

2

53005

2

19

115

158

0

30

9

6

2

0

2

1

3

2

2

3

2

26506

2

19

135

175

1

10

7

8

2

0

1

1

1

3

1

4

1

39381

1

19

170

183

0

10

8

7

2

0

1

3

2

3

2

3

2

31867

2

18

107.6

164

0

45

9

10

3

1

3

4

3

1

3

1

4

13868

2

21

147.71

167

1

10

7

6

2

1

2

2

2

3

2

3

1

72096

2

19

173

162

1

20

8

5

2

0

1

2

2

3

3

4

2

95151

2

20

165

165

0

15

7

7

2

0

2

3

2

3

2

3

3

12925

2

19

115

160

0

15

10

7

2

0

1

2

2

1

3

2

2

30367

1

19

193

182.8

0

15

15

9

1

0

3

1

4

4

2

4

1

20608

2

19

180

163

1

45

10

6

2

0

2

2

2

2

1

4

2

32626

2

19

115

160

0

15

10

8

2

0

1

3

1

2

1

3

1

89287

2

19

140

179

0

45

9

9

2

0

2

1

1

1

1

4

1

977

2

18

211.6

176

0

10

9

8

1

0

2

1

3

4

1

3

2

95896

2

36

150

173

1

15

7

9

1

0

3

3

2

2

2

2

1

91221

2

19

124

162

1

10

6

8

1

0

1

1

1

4

1

4

1

83382

2

19

140

170

1

35

11

7

2

1

3

3

2

3

2

3

1

43543

2

19

118

163

0

30

7

7

2

0

2

1

4

3

4

3

3

88458

1

19

160

170

1

20

9

8

2

0

2

2

1

4

1

4

3

75586

2

19

150

170

1

15

7

7

1

0

3

1

2

3

3

4

1

54870

1

19

160

175

0

10

8

6

3

1

3

4

3

2

2

1

3

196

2

19

140

161.5

0

120

7

8

4

1

3

1

4

3

4

4

3

92383

2

19

120

164

1

30

9

8

2

1

2

1

2

2

1

2

2

91468

1

19

200

173

0

300

8

5

2

0

4

1

4

4

4

4

1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Numerical Analysis And Optimization NAO-III, Muscat, Oman, January 2014

Authors: Mehiddin Al Baali, Lucio Grandinetti, Anton Purnama

1st Edition

3319176897, 9783319176895

More Books

Students also viewed these Mathematics questions

Question

=+a) Whether to invest in solar energy companies.

Answered: 1 week ago

Question

1. Let a, b R, a Answered: 1 week ago

Answered: 1 week ago