Skip to content

Commit fd6e199

Browse files
committed
Week 10 GA Solutions IITM 🏫
1 parent 633570c commit fd6e199

File tree

14 files changed

+672
-0
lines changed

14 files changed

+672
-0
lines changed
85.2 KB
Loading
67.2 KB
Loading
88.2 KB
Loading
34.7 KB
Loading
74 KB
Loading
Lines changed: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
1+
---
2+
title: Graded Assignment 10
3+
date: 2025-10-08
4+
weight: 1.1
5+
image: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSHyWPE5fdL5Mt-K-yvbaceSS7gbUBprr0-QA&s
6+
emoji: πŸ”—
7+
series_order: 1.1
8+
---
9+
10+
11+
## Exercise Questions ❓
12+
13+
![alt text](image.png)
14+
![alt text](image-1.png)
15+
![alt text](image-2.png)
16+
![alt text](image-3.png)
17+
![alt text](image-4.png)
18+
19+
## Solutions πŸƒ
20+
21+
Here are the detailed step-by-step solutions for the questions extracted from the uploaded images.
22+
23+
---
24+
25+
### **Section 1: Bayesian Statistics (The "Fill in the Blanks" Problem)**
26+
27+
**Problem Overview:**
28+
We are analyzing a customer transaction success rate $p$.
29+
* **Likelihood:** Bernoulli($p$) with $n=40$ trials and $k=28$ successes.
30+
* **Prior:** Beta Distribution with Mean $\mu = 0.4$ and Variance $\sigma^2 = 0.02$.
31+
* **Goal:** Find prior parameters, posterior distribution, and posterior mean.
32+
33+
{{< border >}}
34+
#### **Step 1: Determine Prior Parameters (Blanks A, B, C)**
35+
**Concept:**
36+
For a Beta distribution $\text{Beta}(\alpha, \beta)$:
37+
1. $\text{Mean } \mu = \frac{\alpha}{\alpha + \beta}$
38+
2. $\text{Variance } \sigma^2 = \frac{\mu(1-\mu)}{\alpha + \beta + 1}$
39+
40+
**Calculation:**
41+
* Given $\mu = 0.4$ and $\sigma^2 = 0.02$.
42+
* Using the variance formula:
43+
$$0.02 = \frac{0.4(1 - 0.4)}{\alpha + \beta + 1}$$
44+
$$0.02 = \frac{0.24}{\alpha + \beta + 1}$$
45+
$$\alpha + \beta + 1 = \frac{0.24}{0.02} = 12$$
46+
$$\alpha + \beta = 11$$
47+
* Using the mean formula:
48+
$$\frac{\alpha}{11} = 0.4 \implies \alpha = 4.4$$
49+
* Finding $\beta$:
50+
$$\beta = 11 - 4.4 = 6.6$$
51+
52+
**Matches from Option List:**
53+
* **A ($\alpha$) = 4.4** [Option 12]
54+
* **B ($\beta$) = 6.6** [Option 3]
55+
* **C (Prior Distribution) = Beta(4.4, 6.6)** [Option 5]
56+
57+
**Answers:**
58+
* Q11 (A): **12**
59+
* Q12 (B): **3**
60+
* Q13 (C): **5**
61+
{{< /border >}}
62+
63+
{{< border >}}
64+
#### **Step 2: Bayesian Update (Blanks D, E, F)**
65+
**Concept:**
66+
$$\text{Posterior} \propto \text{Likelihood} \times \text{Prior}$$
67+
* Likelihood (Binomial/Bernoulli): $L(p) \propto p^{\text{successes}}(1-p)^{\text{failures}}$
68+
* Prior (Beta): $\pi(p) \propto p^{\alpha-1}(1-p)^{\beta-1}$
69+
70+
**Calculation:**
71+
* **Likelihood (D):** $n=40, k=28$, failures $= 12$.
72+
$$L(p) = p^{28}(1-p)^{12}$$ [Matches Option 6]
73+
* **Prior Term (E):** $\alpha=4.4, \beta=6.6$.
74+
$$\pi(p) = p^{4.4-1}(1-p)^{6.6-1} = p^{3.4}(1-p)^{5.6}$$ [Matches Option 13]
75+
* **Posterior Density (F):** Multiply D and E. Add exponents.
76+
$$p^{28+3.4}(1-p)^{12+5.6} = p^{31.4}(1-p)^{17.6}$$ [Matches Option 1]
77+
78+
**Answers:**
79+
* Q14 (D): **6**
80+
* Q15 (E): **13**
81+
* Q16 (F): **1**
82+
{{< /border >}}
83+
84+
{{< border >}}
85+
#### **Step 3: Posterior Results (Blanks G, H)**
86+
**Concept:**
87+
The posterior density $p^{31.4}(1-p)^{17.6}$ corresponds to a Beta distribution with parameters $\alpha_{new} - 1 = 31.4$ and $\beta_{new} - 1 = 17.6$.
88+
89+
**Calculation:**
90+
* **Posterior Distribution (G):**
91+
$\alpha_{post} = 32.4$, $\beta_{post} = 18.6$.
92+
$$\text{Beta}(32.4, 18.6)$$ [Matches Option 4]
93+
* **Posterior Mean (H):**
94+
$$\text{Mean} = \frac{\alpha_{post}}{\alpha_{post} + \beta_{post}} = \frac{32.4}{32.4 + 18.6} = \frac{32.4}{51} \approx 0.635$$
95+
Rounding to two decimal places gives **0.64**. [Matches Option 2]
96+
97+
**Answers:**
98+
* Q17 (G): **4**
99+
* Q18 (H): **2**
100+
{{< /border >}}
101+
102+
---
103+
104+
### **Section 2: Multivariable Calculus - Critical Points & Directions**
105+
106+
{{< border >}}
107+
**1) Critical Points of $f(x, y) = 3x^2y + y^3 - 3x^2 - 3y^2 + 2$**
108+
109+
**Concept:** Critical points occur where the gradient $\nabla f = \langle f_x, f_y \rangle$ is $\langle 0, 0 \rangle$.
110+
111+
**Solution:**
112+
1. **Partial Derivatives:**
113+
$$f_x = 6xy - 6x = 6x(y - 1)$$
114+
$$f_y = 3x^2 + 3y^2 - 6y$$
115+
2. **Solve $f_x = 0$:**
116+
$6x(y-1) = 0 \implies x = 0 \text{ or } y = 1$.
117+
3. **Case 1: $x = 0$**
118+
Substitute into $f_y = 0$: $3(0)^2 + 3y^2 - 6y = 0 \implies 3y(y-2) = 0$.
119+
Points: $(0, 0)$ and $(0, 2)$.
120+
4. **Case 2: $y = 1$**
121+
Substitute into $f_y = 0$: $3x^2 + 3(1)^2 - 6(1) = 0 \implies 3x^2 - 3 = 0 \implies x = \pm 1$.
122+
Points: $(1, 1)$ and $(-1, 1)$.
123+
124+
**Answer:** The set of critical points includes **$(0, 0), (0, 2), (1, 1)$**.
125+
{{< /border >}}
126+
127+
{{< border >}}
128+
**2) Directional Derivative of $f(x, y) = \frac{xy^2}{x^2+y^4}$ at $(0,0)$**
129+
130+
**Concept:** Using the limit definition of the directional derivative for a unit vector $u = (u_1, u_2)$.
131+
$$D_u f(0,0) = \lim_{t \to 0} \frac{f(tu_1, tu_2) - f(0,0)}{t}$$
132+
133+
**Solution:**
134+
1. Substitute points:
135+
$$\frac{f(tu_1, tu_2)}{t} = \frac{1}{t} \left( \frac{(tu_1)(tu_2)^2}{(tu_1)^2 + (tu_2)^4} \right) = \frac{t^3 u_1 u_2^2}{t(t^2 u_1^2 + t^4 u_2^4)}$$
136+
$$= \frac{t^3 u_1 u_2^2}{t^3(u_1^2 + t^2 u_2^4)} = \frac{u_1 u_2^2}{u_1^2 + t^2 u_2^4}$$
137+
2. Take limit as $t \to 0$:
138+
$$\lim_{t \to 0} \frac{u_1 u_2^2}{u_1^2 + t^2 u_2^4} = \frac{u_1 u_2^2}{u_1^2} = \frac{u_2^2}{u_1}$$
139+
*Note: This is valid only if $u_1 \neq 0$.*
140+
141+
**Answer:** **The directional derivative... is $\frac{u_2^2}{u_1}$, where $u_1$ is non-zero.** (Option 2)
142+
{{< /border >}}
143+
144+
{{< border >}}
145+
**3) Directions of no change for $f(x, y, z) = 2x^3 + y^2 - z^3$ at $(1, 1, 1)$**
146+
147+
**Concept:** "No change" means the directional derivative is 0. This happens when the direction vector is orthogonal (perpendicular) to the gradient vector.
148+
149+
**Solution:**
150+
1. **Gradient $\nabla f$:**
151+
$\langle 6x^2, 2y, -3z^2 \rangle$.
152+
2. **At $(1, 1, 1)$:**
153+
$\nabla f = \langle 6, 2, -3 \rangle$.
154+
3. **Check orthogonality ($\nabla f \cdot \mathbf{v} = 0$) for options:**
155+
* $\langle 1/\sqrt{5}, 0, 2/\sqrt{5} \rangle \cdot \langle 6, 2, -3 \rangle = \frac{6 - 6}{\sqrt{5}} = 0$. (Yes)
156+
* $\langle 0, 3/\sqrt{13}, 2/\sqrt{13} \rangle \cdot \langle 6, 2, -3 \rangle = \frac{6 - 6}{\sqrt{13}} = 0$. (Yes)
157+
* $\langle 2/\sqrt{17}, -3/\sqrt{17}, 2/\sqrt{17} \rangle \cdot \langle 6, 2, -3 \rangle = \frac{12 - 6 - 6}{\sqrt{17}} = 0$. (Yes)
158+
159+
**Answer:** The vectors **$(1/\sqrt{5}, 0, 2/\sqrt{5})$**, **$(0, 3/\sqrt{13}, 2/\sqrt{13})$**, and **$(2/\sqrt{17}, -3/\sqrt{17}, 2/\sqrt{17})$** are correct.
160+
{{< /border >}}
161+
162+
---
163+
164+
### **Section 3: Linear Approximation & Gradients**
165+
166+
{{< border >}}
167+
**4) Linear Approximation of $f(x, y) = y e^x - \frac{1}{4}(x^2+y^2)$ at $(0, 1)$**
168+
169+
**Concept:** $L(x, y) = f(a, b) + f_x(a,b)(x-a) + f_y(a,b)(y-b)$.
170+
171+
**Solution:**
172+
1. $f(0, 1) = 1 \cdot e^0 - \frac{1}{4}(0+1) = 1 - 0.25 = 0.75$.
173+
2. $f_x = y e^x - \frac{x}{2} \implies f_x(0,1) = 1(1) - 0 = 1$. ($A=1$)
174+
3. $f_y = e^x - \frac{y}{2} \implies f_y(0,1) = 1 - 0.5 = 0.5$. ($B=0.5$)
175+
4. Form: $L = 0.75 + 1(x) + 0.5(y-1) = x + 0.5y + 0.25$.
176+
So $C = 0.25$.
177+
5. **Calculate $A + 2B + 4C$:**
178+
$$1 + 2(0.5) + 4(0.25) = 1 + 1 + 1 = 3$$
179+
180+
**Answer:** **3**
181+
{{< /border >}}
182+
183+
{{< border >}}
184+
**5) Cardinality of set S for $f(x, y) = 2\sqrt{x^2+4y}$**
185+
186+
**Concept:** We need unit vectors $\mathbf{u}$ such that $D_u f(-2, 3) = 0$. This implies $\mathbf{u} \perp \nabla f$. In 2D, there are always exactly 2 unit vectors perpendicular to any non-zero gradient.
187+
188+
**Solution:**
189+
1. $\nabla f = \langle \frac{2x}{\sqrt{x^2+4y}}, \frac{4}{\sqrt{x^2+4y}} \rangle$.
190+
2. At $(-2, 3)$: Denom = $\sqrt{4+12} = 4$.
191+
$\nabla f = \langle -4/4, 4/4 \rangle = \langle -1, 1 \rangle$.
192+
3. Perpendicular vectors to $\langle -1, 1 \rangle$ are parallel to $\langle 1, 1 \rangle$.
193+
4. Unit vectors: $\pm (\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}})$. Total count is 2.
194+
195+
**Answer:** **2**
196+
{{< /border >}}
197+
198+
{{< border >}}
199+
**6) Estimate $f(1.2, 0.9)$ using Linear Approximation for $f = xy e^x$**
200+
201+
**Solution:**
202+
1. Point $(1, 1)$. $f(1, 1) = e$.
203+
2. $f_x = y(e^x + xe^x)$. At $(1, 1) \to 1(e+e) = 2e$.
204+
3. $f_y = x e^x$. At $(1, 1) \to e$.
205+
4. $L(x, y) = e + 2e(x-1) + e(y-1)$.
206+
5. Input $x=1.2, y=0.9$:
207+
$$L(1.2, 0.9) = e + 2e(0.2) + e(-0.1) = e + 0.4e - 0.1e = 1.3e$$
208+
6. Result is $\beta e$, so $\beta = 1.3$.
209+
210+
**Answer:** **1.3**
211+
{{< /border >}}
212+
213+
---
214+
215+
### **Section 4: Max Rate of Change & Tangents**
216+
217+
{{< border >}}
218+
**Questions 9, 10, 11, 12: Max Directional Derivative**
219+
220+
**Concept:** The maximum directional derivative at a point occurs in the direction of the gradient $\nabla f$. Its value is the magnitude $|\nabla f|$.
221+
222+
**Solutions:**
223+
* **Q9:** For $T = e^{-(x^2+y^2+z^2)}$, $\nabla T = -2 \langle x, y, z \rangle e^{-(x^2+y^2+z^2)}$.
224+
* Max rate is magnitude: $2 \sqrt{x^2+y^2+z^2} e^{-(x^2+y^2+z^2)}$. (Matches first statement option).
225+
* Direction is $\nabla T$, which points opposite to the position vector. Normalized: $-\frac{\langle x, y, z \rangle}{\sqrt{x^2+y^2+z^2}}$. (Matches third statement option).
226+
* **Answer:** Options 1 and 3 are true.
227+
228+
* **Q10:** $f_1 = y^6 e^{5x}$. $\nabla f$ at $(0,0)$.
229+
* $f_x = 5y^6 e^{5x} \to 0$. $f_y = 6y^5 e^{5x} \to 0$.
230+
* **Answer:** **0**
231+
232+
* **Q11:** $f_2 = 5 - 4x^2 + 2x - 6y^2$.
233+
* $f_x = -8x + 2 \to 2$. $f_y = -12y \to 0$.
234+
* Magnitude $|\langle 2, 0 \rangle| = 2$.
235+
* **Answer:** **2**
236+
237+
* **Q12:** $f_3 = 6x \sin(6x) + 6y \cos(6y)$.
238+
* $f_x \to 0$ (since $\sin(0)=0$ and $x=0$).
239+
* $f_y = 6\cos(6y) - 36y\sin(6y) \to 6(1) - 0 = 6$.
240+
* Magnitude $|\langle 0, 6 \rangle| = 6$.
241+
* **Answer:** **6**
242+
{{< /border >}}
243+
244+
{{< border >}}
245+
**13) Tangent Plane to $z = 5 - x^4 - y^2$ at $(1, 1, 3)$**
246+
247+
**Solution:**
248+
1. Let $F(x, y, z) = x^4 + y^2 + z - 5 = 0$.
249+
2. Normal vector $\mathbf{n} = \langle 4x^3, 2y, 1 \rangle$.
250+
3. At $(1, 1, 3)$: $\mathbf{n} = \langle 4, 2, 1 \rangle$.
251+
4. Plane eq: $4(x-1) + 2(y-1) + 1(z-3) = 0$.
252+
$4x + 2y + z - 4 - 2 - 3 = 0 \implies 4x + 2y + z = 9$.
253+
$z = -4x - 2y + 9$.
254+
5. $A = -4, B = -2, C = 9$.
255+
6. $C - A - B = 9 - (-4) - (-2) = 9 + 4 + 2 = 15$.
256+
257+
**Answer:** **15**
258+
{{< /border >}}
259+
260+
{{< border >}}
261+
**8) Rate of change of $T$ at $(1, 0, 0)$ toward $(8, 6, 0)$**
262+
263+
**Solution:**
264+
1. Gradient $\nabla T$ at $(1, 0, 0)$ is $\langle -2/e, 0, 0 \rangle$.
265+
2. Vector $\mathbf{v}$ from $(1,0,0)$ to $(8,6,0)$ is $\langle 7, 6, 0 \rangle$.
266+
3. Unit vector $\mathbf{u} = \frac{\langle 7, 6, 0 \rangle}{\sqrt{7^2+6^2}} = \frac{\langle 7, 6, 0 \rangle}{\sqrt{85}}$.
267+
4. $A = \nabla T \cdot \mathbf{u} = \frac{-2}{e} \cdot \frac{7}{\sqrt{85}} = \frac{-14}{e\sqrt{85}}$.
268+
5. Value asked: $10Ae = 10 \left( \frac{-14}{e\sqrt{85}} \right) e = \frac{-140}{\sqrt{85}}$.
269+
270+
**Answer:** **$\frac{-140}{\sqrt{85}}$** (approx -15.18)
271+
{{< /border >}}
272+
273+
{{< border >}}
274+
**14) Find $f_x(1, 1)$ given tangent line info**
275+
276+
**Concept:** The slope of the tangent line in the direction of the x-axis (direction $\langle 1, 0 \rangle$) is the partial derivative with respect to x, $f_x$.
277+
278+
**Solution:**
279+
1. Tangent line passes through contact point $(1, 1, f(1,1)) = (1, 1, 3)$.
280+
2. It also passes through $(0, 1, 5)$.
281+
3. The change in $y$ is 0, so this line represents the slope in the x-direction.
282+
4. Slope $m = \frac{\Delta z}{\Delta x} = \frac{5 - 3}{0 - 1} = \frac{2}{-1} = -2$.
283+
5. Therefore, $f_x(1, 1) = -2$.
284+
285+
**Answer:** **-2**
286+
{{< /border >}}
97.8 KB
Loading
31.9 KB
Loading
51 KB
Loading
112 KB
Loading

0 commit comments

Comments
Β (0)