Monday, June 26, 2023

Confidence Interval for Mean

Hôm nay Gia Sư Toán Cao Cấp và Xác Suất Thống Kê sẽ giới thiệu đến các bạn dạng bài tập tìm khoảng tin cậy cho trung bình cũng như là Code Python.

1. Find 90% percent confidence interval for the mean of a normal distribution with xichma=3 given sample (3.3, -0.3, -0.6, -0.9) . What would be the confidence interval if xichma were unknown ?

Solution




a. Code Python:

b. Code Python:

import numpy as np

import scipy.stats as st

# define sample data

gfg_data = [3.3, -0.3, -0.6, -0.9]

# create 90% confidence interval

st.t.interval(alpha=0.90, df=len(gfg_data)-1,

      loc=np.mean(gfg_data),

      scale=st.sem(gfg_data))

Result: (-1.937561291069545, 2.6875612910695437)

2. The breaking strength in pounds of five speciments of manila rope of diameter 3/16 inch were found to be 660, 460, 540, 580, 550

a. Estimate the mean breaking strength by a 95 percent confidence interval assuming normality ?

b. Estimate the point at which only 5 percent of such speciments would be expected to break. 

c. Estimate xichma^2 by a 90 percent confidence interval; also xich

d. Plot an 81 percent confidence region for the joint estimation of nuy and xich^2; for nuy and xich

 

Nhận dạy: Xác Suất Thống kê, Zalo: 0979 027 945 or Inbox Facebook


0 nhận xét:

Post a Comment

Pageviews past week