Question: Section # 2 based on the Sheet = Data and the AdjClose variable: Python: Price = df [ ' AdjClose ' ] mean _ v

Section #2 based on the Sheet=Data and the AdjClose variable:
Python:
Price = df['AdjClose']
mean_v = np.mean(Price)
std_v = np.std(Price, ddof=1) # Use ddof=1 for sample standard deviation
df_v = len(Price)-1
# Using SciPy
# 95% Confidence Interval
confidence_interval = stats.t.interval(0.95, df_v, loc=mean_v, scale=std_v / np.sqrt(len(Price)))
print('Mean =', mean_v)
print('Std =', std_v)
print('df =', df_v)
print('95% CL =', confidence_interval)
# One sample test with a compared mean value to 180
stats.ttest_1samp(Price, popmean=mean_v)
test_1samp_result = stats.ttest_1samp(Price, popmean=180, alternative='two-sided')
print('180 t-statistic =', test_1samp_result.statistic)
print('180 p-value =', test_1samp_result.pvalue)
Result:
Mean =183.94099557522125
Std =24.18073993299828
df =451
95% CL =(181.70580013487844,186.17619101556406)
Two-Sided 180 t-statistic =3.4650186659320665
Two-Sided 180 p-value =0.0005808961945123946
Question: This question is worth 5 points.
Please tell me what these results are telling you based on the descriptive statistics of the Adjust Closing Price sample? Remember, everything I have provided should mean something to you. I want to see if you really understand these descriptive statistics for the AdjClose Price. You better pay attention to the question of Two-Sided test.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!