Give answers to each question so that I score full...
作成日: 2025年9月3日
使用モデル GPT-5 Thinking by Chat01
作成日: 2025年9月3日
使用モデル GPT-5 Thinking by Chat01
Give answers to each question so that I score full marks
Give answers to each question so that I score full marks
pythonfrom PIL import Image, ImageOps, ImageFilter, ImageEnhance, Image img_path="/mnt/data/Screenshot_2025-08-31-13-02-31-984_com.google.android.apps.docs.jpg" img=Image.open(img_path) img.size (1220, 2712)
pythondisplay(img.resize((610,1356)))
python# Crop the first page content region manually crop1=img.crop((180,280,1030,1320)).resize((600,700)).filter(ImageFilter.SHARPEN) display(crop1)
pythondisplay(crop1.crop((85,348,565,463)).resize((600,300)).filter(ImageFilter.SHARPEN))
pythoncrop2=img.crop((180,1320,1030,2550)).resize((700,900)).filter(ImageFilter.SHARPEN) display(crop2)
pythondisplay(crop2.crop((181,207,515,283)).resize((600,200)).filter(ImageFilter.SHARPEN))
pythonimport numpy as np, math, statistics as stats classes=[(0,10),(10,20),(20,30),(30,40),(40,50),(50,60)] f=[1,6,10,15,11,7] mid=[(a+b)/2 for a,b in classes] N=sum(f) mean=sum(fi*xi for fi,xi in zip(f,mid))/N mean, N, mid (35.0, 50, [5.0, 15.0, 25.0, 35.0, 45.0, 55.0])
pythonimport numpy as np x=mid mu2=sum(fi*((xi-35)**2) for fi,xi in zip(f,x))/N mu3=sum(fi*((xi-35)**3) for fi,xi in zip(f,x))/N mu4=sum(fi*((xi-35)**4) for fi,xi in zip(f,x))/N mu1=0 mu1, mu2, mu3, mu4 (0, 164.0, -360.0, 62000.0)
pythonimport numpy as np points=[(-1,2),(0,0),(0,1),(1,2)] X=np.array([[1,x,x**2] for x,y in points],dtype=float) y=np.array([y for x,y in points],dtype=float) # least squares coeffs=np.linalg.lstsq(X,y,rcond=None)[0] coeffs array([0.5, 0. , 1.5])
pythony_pred=X@coeffs residuals=y-y_pred y_pred,residuals,sum(residuals**2) (array([2. , 0.5, 0.5, 2. ]), array([ 4.4408921e-16, -5.0000000e-01, 5.0000000e-01, 4.4408921e-16]), 0.5)
pythonobs=[14,16,8,12,11,9,14] sum(obs) 84
pythonE=84/7 chi=sum((o-E)**2/E for o in obs) chi 4.166666666666667
pythonn1=900; n2=1600 p1=0.20; p2=0.185 x1=int(p1*n1); x2=int(p2*n2) pbar=(x1+x2)/(n1+n2) se=(pbar*(1-pbar)*(1/n1+1/n2))**0.5 z=(p1-p2)/se pbar,se,z (0.1904, 0.016359027409286218, 0.9169249262022294)
pythonimport math n=16; xbar=53; ss=150 s=math.sqrt(ss/(n-1)) t=(xbar-56)/(s/math.sqrt(n)) s,t (3.1622776601683795, -3.794733192202055)
pythonimport math n=16; xbar=53; ss=150 s=math.sqrt(ss/(n-1)) t=(xbar-56)/(s/math.sqrt(n)) s,t (3.1622776601683795, -3.794733192202055) 4.4750000000000005
Got it — I’ll work through every part and give clean, exam-ready answers.
(Where a test is asked for, I show the test statistic, d.f., the critical value, and the decision.)
Let i.i.d.
.
Sum .
(Variance if required: .)
Hypothesis: coins unbiased ⇒ .
.
Expected frequency in 160 trials: .
| 0 | 1 | 2 | 3 | 4 | |
|---|---|---|---|---|---|
| Observed | 8 | 34 | 69 | 43 | 6 |
| Expected | 10 | 40 | 60 | 40 | 10 |
(Optionally, χ² GOF test:
with d.f.; critical at 5% .
Since , the binomial fits.)
Poisson process with rate :
(i) .
(ii) Independent increments.
(iii) Stationary increments: .
(iv) , as .
Derivation. Partition into pieces of length and use (ii)–(iv). The p.g.f./mgf limit or the binomial limit gives
This is the Poisson distribution with mean and variance both .
Example: number of calls arriving at a switchboard per minute.
Classes (marks):
Frequencies: . Midpoints: .
Total . Mean
Hence the central moments :
(These come from the midpoints; show a short working table if space allows.)
This is the Beta-prime (Type-VI) density with parameters .
Using (valid for ):
So
This is geometric with parameter (support starts at 1).
.
Chebyshev with :
Actual probability:
If are i.i.d. with and , then
Sketch proof: Consider the mgf of : (M_{Z_n}(t)=\big(M_{X_1}!\left(\tfrac{t}{\sqrt n}\right) e^{-t\mu/\sqrt n}\big)^n \to \exp!\left(\tfrac{t^2}{2}\right)) by a Taylor expansion of about 0. The limit is the mgf of , proving convergence in distribution.
Fit . Normal equations (or matrix least squares) give
(). Residual sum of squares .
If with density , then completing the square gives
The characteristic function is .
Moments satisfy .
(i) Null hypothesis : the default claim about a population parameter (e.g., “no effect,” , ). We attempt to reject using a test statistic and a significance level .
(ii) Degrees of freedom (d.f.): number of independent pieces of information used to estimate a parameter or compute a statistic (e.g., for sample variance, d.f. ; for χ² GOF with classes and estimated parameters, d.f. ).
Observed: ; .
Expected under uniformity: in each day.
d.f. . Critical value (5%): .
Since ⇒ fail to reject uniformity. Accidents appear uniformly distributed.
A: .
B: .
Test vs two-sided.
Pooled .
SE .
At 5%, ⇒ not significant. No evidence of a real difference.
, , .
vs two-sided.
d.f. ; critical (5%) .
reject . The sample is not from a population with mean 56.
For d.f. , the pdf is
Main characteristics: symmetric about 0; heavier tails than normal;
for ; for ; median 0; unimodal.
Normal limit: as ,
and the constant in front tends to , so .
If with , then
All parts solved — if you need any of these rewritten in your preferred step-by-step working format (tables, intermediate sums, or boxed final statements), say the word and I’ll format to match your exam style.