Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

EEE 137 1s1920 Problem Set #3 20 November 2019

Name: Student Number:


Large Class Instructor: DC Instructor:

INSTRUCTIONS

• For problem-solving parts, support correct answers with complete and concise solutions. The checker
reserves the right to disregard illegible handwriting.
• Answer each problem on a separate sheet, properly labeled with your name and the name of your large
class instructor.

• Box all final answers.


• Deadline: 5PM 27 November 2019. Dropbox will be placed at DEEE 220.

Problem 1. Bayesian Inference


For this part, refer to the public data set available at:
https://data.gov.ph/sites/default/files/PSHS%20System%20Scholars%20Supported%20SY%202017-2018.csv

Suppose we want to check whether scholars entering PSHS (from Grade 7 to Grade 12) are equally represented
in the two genders- Male and Female. Using Bayesian Inference, answer the following questions:

1. 3points What is the collective ratio of male to female (via total counts)?
2. 2points What is the likelihood of a male scholar in PSHS?
Arrange the spreadsheet so that you will have data on the male to female ratio for each grade for each
campus. Refer to the example below. Remove rows with 0 entries for the scholar count. There should be
78 row entries in your sorted data.
3. 5points Using Gaussian approximation/CLT, what are the statistical parameters of your sorted data
(mean and standard deviation)?

4. 5points Find a MAP estimate of the male to female ratio given a prior hunch of M2F ratio as uniformly
distributed between 0.5 to 2.5.
5. 10points Find a MAP estimate of the male to female ratio given a prior hunch of M2F ratio as Gaussian
with mean 1.0 and variance of 0.10. Hint: Product of two Gaussians

Problem 2. Bayesian Inference


You picked up a coin which feels heavier on one side, and so you believe that the probability of getting a head
is θ with a prior distribution of fθ (θ) = 30 · θ(1-θ)4 .

1. 5points Based on your prior, what is the probability that the coin is more likely to produce a head than
a tail?
2. 5points You tossed the coin two times, and got two tails. Solve for the MAP estimate of θ.

Problem 3. Classical Inference


5points Consider a digital communications receiver with two antennas. The transmitted signal is either +1 or
-1. Each antenna has its own demodulator, and the received signal after demodulation at antenna k ∈ {1,2}, is
given by

V 1 = U + Z1
V 2 = U + Z2

where U is the transmitted signal, and Z1 , Z2 ∼N (0,1) are independent Gaussian random variables. You
may also assume that U is independent of Z1 and Z2 . The receiver makes a maximum likelihood (ML) decision
on which signal is transmitted based on Y = V1 + V2 . Calculate the probability of making an erroneous decision.

Page 1 of 3
EEE 137 1s1920 Problem Set #3 20 November 2019

Problem 4. Estimation
Let X and Y be random variables, where Y is to be estimated as Ŷ = âX (without an extra constant).

1. 5points Solve for â so that Ŷ produces the minimum mean square error.
2. 5points Show that the mean square error when â = Cov(X,Y) / Var(X) is at least as large as the mean
square error obtained using #1 above.

Problem 5. Least Squares Linear Regression


Samples of the I-V curve measurement of a diode is shown below.
Voltage, V 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4
Current, A 0.01 0.05 0.20 0.70 2.00 4.00 8.00 14.00 20.00
We want to generate a model for estimating the current passing through this diode in terms of its forward
voltage. One way to do this is to use a simple approximation by assuming a linear model of the form I = θ0 + θ1
V, where I is the current in Amperes and V is the voltage in Volts.

1. 4points Solve for the coefficients of the linear least squares regression model, I= θ0 + θ1 V.
2. 2points Determine the sum of square error for the model you have solved above.
V
An alternative model for the diode current is to assume a non-linear model of the form I= αe β . We can
use linear least squares regression by linearizing this model into a linear model of the form I 0 =a+bV,
where I 0 =f(I).
3. 3points Solve for I 0 in terms of I such that I 0 will become a linear function of V.
4. 6points Solve for α and β in terms of a and/or b.
V
5. 6points Solve for the coefficients of the least squares regression model, I=αe β , by performing linear least
squares regression on the model I 0 =a+bV.
6. 2points Determine the sum of square error for the model you have solved in #5 above.

7. 2points If you can only choose one of the two regression models, which would you choose (linear or
non-linear) and why?

Problem 6. Hypothesis Testing


Open the EEE137-HW-Hypothesis.csv. This contains data from 392 student samples on their mile times
(number of minutes taken to run 1 mile distance). Below is a sample of the first few rows of the data:

ids Athlete MileMinDur MileTime


20183 0 0:07:47 7.78
20230 1 0:07:34 7.57
20243 0 0:12:31 12.52
20248 0 0:10:13 10.22

The first column uniquely identifies each student. The second column (Athlete) has a value of 1 if the student
is an athlete and 0 otherwise. The third column is the time recorded during the trial run and is converted to
its equivalent time in minutes in the last column. We want to determine if there is enough evidence to support
the theory that athletes run faster (smaller mile time) than the average of students within the sampled class.

1. 2points What are the null and alternative hypotheses?


2. 3points Determine t0

3. 2points Determine the p-value for α = 0.05.


4. 3points What will your conclusion be, based the values above?

Page 2 of 3
EEE 137 1s1920 Problem Set #3 20 November 2019

Problem 7. ANOVA
A clinical trial is run to compare three weight loss programs over the course of 8 weeks: (1) a Low Calorie Diet,
(2) Low Fat Diet, and (3) Low Carbohydrate. For comparison purposes, a fourth group, a control group, is
added to assess the placebo effect of knowing theyre participating in a dietary study. A total of 20 patients
agree to participate in the study and are randomly assigned to the four groups. The difference of the measured
weight at the start and end of the trial is shown below. Note that positive differences indicate weight loss while
negative differences indicate weight gain.

Low Calorie Low Fat Low Carbohydrate Control Group


8 2 3 2
9 4 5 2
6 3 4 -1
7 5 2 0
3 1 3 3

Answer the following:

1. 3points What are the null and alternative hypotheses? Write these out in terms of the given.
2. 3points Identify the critical value, Fcritical , given that α = 0.05.
3. 9points Fill up the ANOVA Table. Show your solutions.

Source of Variation SS d.f. MS F


Bet. Treatments
Error
Total

4. 4points Evaluate the null hypothesis based on your answers above. What is your conclusion?
5. 6points If a person wants to lose the most amount of weight, which diet should he/she choose? Use the
Tukey HSD to identify the best diet.

Page 3 of 3

You might also like