2. Given Information:: 3. Calculate ε
2. Given Information:: 3. Calculate ε
2. Given Information:: 3. Calculate ε
3. Calculate ε:
ε is the half-width of the claimed range, so ε = (0.49 - 0.35) / 2 = 0.07.
P (∣0.42−µ∣≥0.07)≤2e−490≈2⋅2.71828−490≈2⋅1.2339×10−213
The probability is extremely close to zero, indicating that the probability of µ falling outside the
claimed range [0.35, 0.49] is almost negligible.
7. Conclusion:
Based on the Hoeffding Inequality, the claim that µ ∈ [0.35, 0.49] is very likely to be true with a high
confidence level. The probability of being correct is extremely high, well above 97.4%.
ANS :
Given:
3. Update wt+1:
To update w t+ 1 , you need to add xi to w t because the current prediction is incorrect, and
wt+1 should be adjusted to correctly classify xi :
wt+1=wt+yi ⋅ xi
ANS:
To find the probability that one of the three coins gets all heads when each
of them is tossed 4 times, we can use the binomial probability formula. In
this case, we want to calculate the probability of success (getting all heads)
for one specific coin in 4 tosses. Then, we multiply this probability by 3
because there are three coins, and any one of them could get all heads.
The binomial probability formula is:
P(X=k)=(nk)⋅ p k ⋅ (1−p) n−k
where
P(X=k) is the probability of getting exactly k successes.
n is the number of trials (in this case, the number of coin tosses for one
specific coin, which is 4).
k is the number of successful outcomes (in this case, getting all heads,
which is 4 heads).
p is the probability of success on a single trial (in this case, the
probability of getting heads on one toss of a fair coin, which is 0.5).
(𝑛𝑘) represents the binomial coefficient, which is the number of ways to
choose k successes out of n trials.
Now, let's calculate the probability of getting all heads for one specific
coin in 4 tosses:
P(One coin gets all heads)=(44) ⋅(0.5)4⋅(1−0.5)4−4
P(One coin gets all heads)=1⋅(0.5)4⋅(0.5)0
P(One coin gets all heads)=(0.5)4
Now, since there are three coins, and we want to find the probability that any one
of them gets all heads, we multiply this probability by 3:
P(At least one coin gets all heads)=3 ⋅ (0.5) 4
Now, calculate the value:
1 3
P(At least one coin gets all heads)=3⋅(0.5)4=3⋅ =
16 16
So, the probability that at least one of the three coins gets all heads when
3
each of them is tossed 4 times is or approximately 0.1875 (18.75%).
16
4) In two-dimensional plane of(x1,
x2); shown, illustrate the
function x2 = 2x1 + 3
assuming it is a separating
hyperplane and the two
dimensions are xl and x2). (b)
Write down two points on this
line and show them in the
graph.
(c) write and show on the graph two points above the line and
one point below the line. (d) Write a data set of 2-class
classification where this separating hyperplane is the solution (the
data set contains 4 data points: two data points in class+1 and two
in class -1; notice here that d=2}; explain briefly.
ANS:
(a) To illustrate the function x 2 =2x 1 +3 as a separating hyperplane in a two-
dimensional plane (x 1 ,x 2 ), you can consider it as a linear equation in slope -
intercept form, y=mx+b, where y=x 2 , =m=2, and b=3. This equation
represents a line in the x 1 x 2 -plane.
(b) Let's write down two points on this line and show them on the graph:
Point 1: When x 1 =0, we can find x 2 by substituting into the equation:
X 2 =2(0)+3=3
So, one point on the line is (0, 3).
Point 2: When x1=1, we can find x2
X 2 =2(1)+3=5
Now, lets show these points on the graph
(c) To show two points above the line and one point below the line on the graph, we
can choose arbitrary values for x 1 and calculate x 2 based on the equation x 2 =2x 1 +3.
Here are
three points:
POINT ABOVE THE LINE 1: LET X1=2, THEN X2=2(2)+3=7. SO, ONE POINT ABOVE THE LINE IS (2, 7).
POINT ABOVE THE LINE 2: LET X1=−1, THEN X2=2(−1)+3=1. SO, ANOTHER POINT ABOVE THE LINE IS (-1,
1).
POINT BELOW THE LINE: LET X1=3, THEN X2=2(3)+3=9. SO, ONE POINT BELOW THE LINE IS (3, 9).
ANS:
P OINT A BOVE
THE L INE : C HOOSE A VALUE OF X AND CALCULATE Y SUCH THAT Y IS
GREATER THAN THE VALUE GIVEN BY Y= X 2 +5. F OR EXAMPLE , WHEN X =2:
Y=X 2 +5=9
SO, THE POINT (2, 9) LIES ABOVE THE LINE Y = X 2 +5.
P OINT B ELOW THE L INE : C HOOSE A VALUE OF X AND CALCULATE Y SUCH THAT Y IS
LESS THAN THE VALUE GIVEN BY Y = X 2 +5. F OR EXAMPLE , WHEN X =−2:
Y =(−2) 2 +5=9
^
10| .
| .
5| .
| .
| .
| .
+---------------------------------->
-5 -4 -3 -2 -1 0 1 2 3 4 5
8) Write the PLA algorithm and explain each step in one line (write in
pseudocode sequence of steps).
ANS:
PLA Algorithm:
1. INITIALIZE THE WEIGHT VECTOR W AND BIAS TERM B TO ZEROS.
2. REPEAT UNTIL CONVERGENCE:
A. FOR EACH TRAINING EXAMPLE (XI, YI):
I. CALCULATE THE PREDICTED OUTPUT Y_HAT USING THE
CURRENT W AND B : Y_HAT = SIGN (W · XI + B).
II. IF Y_HAT IS NOT EQUAL TO THE TRUE LABEL YI
(MISCLASSIFIED):
- UPDATE THE WEIGHT VECTOR: W = W + Η * YI * XI.
- UPDATE THE BIAS TERM : B = B + Η * YI.
B. CHECK FOR CONVERGENCE : IF THERE ARE NO MISCLASSIFIED
EXAMPLES, STOP.