# Hypothesis Testing and Confidence Intervals in Excel: Analyzing Student Behavior Data

Explore the application of statistical analysis using Excel to examine diverse aspects of student behavior. This comprehensive guide delves into hypothesis testing and confidence intervals, showcasing practical examples that demonstrate how to leverage Excel for insightful data interpretation and decision-making in academic research. Discover the power of Excel in unlocking valuable insights from your datasets, from testing hypotheses about grooming habits to comparing study hours and understanding pet ownership trends among MAT115 students.

## Problem 1: Average Grooming Time

Problem Description:The objective is to assess whether the average daily grooming time for MAT115 students differs significantly from 0.8 hours. The sample data consists of 37 observations with a sample mean (xˉ) of 1.2408 and a standard deviation (S) of 1.002254.

Hypothesis Test:

• Null Hypothesis Ho: μ=0.8
• Alternative Hypothesis Ha:μ≠0.8

Test Statistic:

t=(x ̅-μ)/(s/√n) ~ t_((n-1)),

x=1.2408, S=1.002254, μ=0.8 and n=37

t=(1.2408-0.8)/(1.002254/√37)= 2.6753

P-value = 2*pt>tcal for two-tailed test

p=2*pt>2.6753, df=36

p=2*0.005581

Hence, p-value = 0.011162

Conclusion: The p-value (0.0112) is less than the significance level (0.05). Therefore, we reject the null hypothesis, concluding that the average grooming time significantly differs from 0.8 hours.

95% Confidence Interval

95% CI= x ̅±t_((n-1, α/2))*s/√n

95% CI= 1.2408±t_((37-1, 0.05/2))*1.002254/√37,where t_((37-1,0.05/2) )=2.028094

95% CI= 1.2408±2.028094*1.002254/√37

95% CI= 1.2408±0.3341681=[ 0.9066319,1.574968]

Hence, 95% CI=[0.9066,1.57450]

Interpretation of CI: we are 95% confident that the population mean number of hours MAT115 students spend a day grooming lies between 0.90 and 1.57

## Problem 2: Weekly Study Hours

Problem Description:The goal is to determine if the average weekly study hours for MAT115 students are significantly less than 17. The sample data includes 37 observations with a sample mean (xˉ) of 10.56757 and a known population standard deviation (σ) of 10.

Hypothesis Test:

• Null Hypothesis (0H0​): =17μ=17
• Alternative Hypothesis (Ha​): <17μ<17

Test Statistic: Z=(x ̅-μ)/(σ/√n) ~ N(0,1)

x=10.56757, σ=10, μ=17 and n=37

Z=(10.56757-17)/(10/√37)= -3.912694

P-value = p(Z

P-value = pZ

p=pZ<-3.912694

p=0.0000

Hence, p-value = 0.0000

Conclusion: The p-value (0.0000) is less than 0.05. Thus, we reject the null hypothesis, concluding that the weekly study hours are significantly less than 17.

95% Confidence Interval

95% CI= x ̅±1.96*σ/√n

95% CI= 10.56757±1.96*1.002254/√37,

95% CI= 10.56757±1.96*10/√37

95% CI= 10.56757±3.22222=[ 7.34535,13.78979]

Hence, 95% CI=[ 7.34535,13.78979]

Interpretation of CI: we are 95% confident that the population mean number of hours a week a MAT115 student studies lie between 7.35 and 13.79

## Problem 3: Dog Ownership Percentage

Problem Description: This analysis aims to determine if the percentage of MAT115 students owning a dog is significantly different from 36.5%. The sample includes 37 students, with 18 owning a dog.

Hypothesis Test:

• Null Hypothesis (0H0​): =0.365p=0.365
• Alternative Hypothesis (Ha​): ≠0.365p=0.365

Test Statistic: Z=(p ̂-p)/√((p(1-p))/n) ~ N(0,1),

p ̂=0.4865,p=0.365 and n=37

Z=( 0.4865-0.3650)/√((0.365*(1-0.365))/37)= 1.535125

P-value = p(Z>Z_cal ) for a left-tailed test

p=2*p(Z>1.535125)

p=2*0.06237656

p= 0.1247531

Hence, p-value = 0.1248

Conclusion: The p-value (0.1248) is greater than 0.05, leading to the acceptance of the null hypothesis. There is no significant difference in the percentage of students owning a dog.

95% Confidence Interval

95% CI= p ̂±1.96*√((p ̂(1-p ̂))/n)

95% CI= 0.4865±1.96*√(( 0.4865*(1- 0.4865))/37)

95% CI= 0.4865±0.1610523=[ 0.3254477,0.6475523]

Hence, 95% CI=[ 0.3254477,0.6475523]

Interpretation of CI: we are 95% confident that the percentages of MAT115 students who own a dog lie between 32.54% and 64.76%

## Problem 4: Sleep Hours Comparison

Problem Description: The aim is to assess if the nightly sleep hours for two groups of students (DA and DB) differ significantly. The samples include 22 observations for DA and 15 for DB.

Hypothesis Test:

• Null Hypothesis (0H0​): μDA​=μDB​
• Alternative Hypothesis (Ha​): μDA​=μDB​

Test Statistic:t=(x ̅_DA-x ̅_DB)/√((S_DA^2)/n_DA +(S_DB^2)/n_DB ) ~ t_((n_DA+n_DB-2)),

x ̅_DA=7.22727,S_DA^2=1.517316017,n_DA=22,x ̅_DB=5.683333,S_DB^2=2.129167 ,n_DB=15

t=(7.22727-5.683333)/√(1.517316017/22+2.129167/15)= 3.361844

P-value = 2*p(t>t_cal ) for two-tailed test

p=2*p(t>3.361844,df=35)

p=2*0.00094

Hence, p-value =0.00188

Conclusion: The p-value (0.00188) is less than 0.05, leading to the rejection of the null hypothesis. The nightly sleep hours for DA students are significantly different from DB students.

95% Confidence Interval: 95% CI=(x ̅_DA-x ̅_DB )±t_((35,0.05/2 ))*√((S_DA^2)/n_DA +(S_DB^2)/n_DB )

95% CI=(7.22727-5.683333)±2.030108*√(1.517316017/22+2.129167/15)

95% CI= 1.543937± 0.9323333

95% CI=[ 0.6116037,2.47627]

Hence, 95% CI=[ 0.6116,2.4763]

Interpretation of CI: we are 95% confident that the difference in the population means of the number of hours a night DA students sleep and the number of hours a night DB students sleep lie between 0.6116 and 2.4763.