0% found this document useful (0 votes)
40 views10 pages

2024 AI4ALL Admissions Quiz

Uploaded by

Rhea Agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views10 pages

2024 AI4ALL Admissions Quiz

Uploaded by

Rhea Agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Stanford AI4ALL 2024 Admissions Activity

This summer’s AI4ALL experience will combine several different STEM disciplines into one cumulative project --
exciting! In order to prepare you for what this might feel like, we’ve designed a set of questions similar to topics we’d
consider during a typical summer session. We’ve purposefully designed these activities to increase in complexity, but
at the same time, we don’t expect applicants to be familiar with all topics incorporated. Please use the linked
resources to access help during the activities.

Choose ONE of the TWO questions below to answer.

Please write your answers on a separate sheet(s) of paper. Please cleanly show all steps of your work that lead to our
solution, but do not send in scratch paper. Responses for admissions activities will consider the following when
evaluating responses:
1. Effort: try your best even if you’ve never learned an idea before!
2. Constructing and justifying responses: communicate your ideas so that we can better understand what you
were thinking along the way.
3. Modeling: create visual representations of your work when appropriate
4. Precision: show us the steps you took to arrive at your solution.
5. Meta-reflection: take a step back and show us your approach, your thought processes, and where you
succeeded/struggled. If you got stuck (which happens all the time in engineering), what actions did you take
to identify the root cause of your confusion, and what type of question would you ask to get unstuck.

Completion time for this activity will vary based on prior knowledge of math concepts. We encourage each applicant
to treat these activities as learning experiences and know that we honor thought processes and curiosity (rather than
purely right-wrong answers alone). Ultimately, our goal is to assess how you learn, how you think about learning in
STEM, and your openness to new approaches and topics.

Do not worry if you are not able to answer all the questions. We are still happy to see thoughtful yet incomplete
submissions that show an honest effort, especially in identifying problem areas where you worked to get yourself
unstuck. If you get stuck on a problem, please show your thought process, explain why you are stuck, and give an
example of a question you would ask a teacher to get unstuck on the question.

Please complete this activity on your own. You may not ask for assistance from friends, family members, tutors, or
teachers. Additionally, please do not refer to any additional online materials for assistance other than the provided
linked resources.

Good luck, and have fun!


Question 1: Probability Basics.
(Suggested time: 30 - 40 minutes without tutorials, 60 minutes with tutorials)

Knowledge of probability is essential for computer science and artificial intelligence. We use probability within our
models to determine how likely an event (or many events) is to occur. Generally speaking, we can think about
probability as: P(some event happening) = 𝑎𝑙𝑙𝑡ℎ𝑒 𝑡𝑜𝑡𝑎𝑙 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑡ℎ𝑒 𝑒𝑣𝑒𝑛𝑡 𝑡ℎ𝑎𝑡 𝑡ℎ𝑎𝑡 𝑐𝑜𝑢𝑙𝑑 𝑦𝑜𝑢 𝑑𝑒𝑠𝑖𝑟𝑒 ℎ𝑎𝑝𝑝𝑒𝑛
For example, suppose I have a Spotify playlist with 1 songs, and 7 of them feature Ariana Grande. What chance do I
have of playing an Ariana Grande song next?

P(I play Ariana Grande for my next song) =


We could express this as: 𝑎𝑙𝑙 𝑡ℎ𝑒𝑎𝑙𝑙 𝑡ℎ𝑒𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝐴𝑟𝑖𝑎𝑛𝑎 𝑠𝑜𝑛𝑔𝑠

=
𝐺𝑟𝑎𝑛𝑑𝑒 𝑜𝑛 𝑚𝑦 𝑠𝑜𝑛𝑔𝑠 𝑆𝑝𝑜𝑡𝑖𝑓𝑦 𝑜𝑛 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡𝑚𝑦 𝑆𝑝𝑜𝑡𝑖𝑓𝑦, 𝑖𝑛 𝑡𝑜𝑡𝑎𝑙 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 507

Want more? Click this tutorial video for additional help.

Adding probability can occur when we try to combine more than one criterion for an event. This could happen when
there are multiple events that are acceptable to us as a “success”. We see this kind of probability with the word “or”
because both event 1 OR event 2 would be considered a success to us!

For example, suppose I have a Spotify playlist with 50 sings, and 7 of them feature Ariana Grande, and 6 of them
feature Drake. What chance do I have of playing an Ariana Grande song OR a Drake song next?

P(I play Ariana or Drake next) = +


𝑎𝑙𝑙𝑎𝑙𝑙 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑡ℎ𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝐴𝑟𝑖𝑎𝑛𝑎 𝑠𝑜𝑛𝑔𝑠 𝑠𝑜𝑛𝑔𝑠 𝑜𝑛 𝑜𝑛 𝑚𝑦 𝑚𝑦 𝑆𝑝𝑜𝑡𝑖𝑓𝑦 𝑆𝑝𝑜𝑡𝑖𝑓𝑦1350 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 𝑎𝑙𝑙𝑎𝑙𝑙 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒

= + =
𝑡ℎ𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝐷𝑟𝑎𝑘𝑒 𝑠𝑜𝑛𝑔𝑠 𝑠𝑜𝑛𝑔𝑠 𝑜𝑛 𝑜𝑛 𝑚𝑦 𝑚𝑦 𝑆𝑝𝑜𝑡𝑖𝑓𝑦 𝑆𝑝𝑜𝑡𝑖𝑓𝑦 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 507 506

Want more? Click this tutorial video for additional help.

Multiplying Probability can occur when more than one event happens. This could happen when we have one event
occurring right a er another, and we want to find success on both events. We see this kind of probability with the word
“and” because we want to calculate the success of the first event AND the second one!

For example, suppose I have a Spotify playlist with 50 songs, and 7 of them feature Ariana Grande, and 6 of them
feature Drake. What chance do I have of playing an Ariana song followed by a Drake song, assuming that songs can
repeat?

P(I play Ariana, and then Drake) = *


𝑎𝑙𝑙𝑎𝑙𝑙 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑡ℎ𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝐴𝑟𝑖𝑎𝑛𝑎 𝑠𝑜𝑛𝑔𝑠 𝑠𝑜𝑛𝑔𝑠 𝑜𝑛 𝑜𝑛 𝑚𝑦6 𝑚𝑦 =𝑆𝑝𝑜𝑡𝑖𝑓𝑦 𝑆𝑝𝑜𝑡𝑖𝑓𝑦250042 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 𝑎𝑙𝑙𝑎𝑙𝑙

= *
𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑡ℎ𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝐷𝑟𝑎𝑘𝑒 𝑠𝑜𝑛𝑔𝑠 𝑠𝑜𝑛𝑔𝑠 𝑜𝑛 𝑜𝑛 𝑚𝑦 𝑚𝑦 𝑆𝑝𝑜𝑡𝑖𝑓𝑦 𝑆𝑝𝑜𝑡𝑖𝑓𝑦 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 507

P(I play Ariana, then Drake) = 𝑎𝑙𝑙𝑎𝑙𝑙 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑡ℎ𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝐴𝑟𝑖𝑎𝑛𝑎 𝑠𝑜𝑛𝑔𝑠 𝑠𝑜𝑛𝑔𝑠 𝑜𝑛 𝑜𝑛 𝑚𝑦 𝑚𝑦 𝑆𝑝𝑜𝑡𝑖𝑓𝑦 𝑆𝑝𝑜𝑡𝑖𝑓𝑦42 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 * 𝑎𝑙𝑙𝑎𝑙𝑙
𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒𝑡ℎ𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝐷𝑟𝑎𝑘𝑒 𝑠𝑜𝑛𝑔𝑠 𝑠𝑜𝑛𝑔𝑠 𝑡ℎ𝑎𝑡 𝑜𝑛 𝐼 𝑚𝑦 ℎ𝑎𝑣𝑒𝑛 𝑆𝑝𝑜𝑡𝑖𝑓𝑦'𝑡 𝑝𝑙𝑎𝑦𝑒𝑑 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 𝑦𝑒𝑡 = 507 * 496 =

1 What if I’m considering the same scenario, except songs can’t repeat?
2450

Why the difference? Well, in the first scenario where my songs could repeat, I could technically play the same Ariana
song twice in a row. This means I’m still considering every playlist song as a success. In the second scenario, I can’t
repeat a song that I’ve already played. Therefore, once I get to the Drake song (which I’m playing second), I have to
take away the Ariana song that was played immediately before it from my total possible songs to be played. This
decreases the denominator from 50 to 49.

Want more? Click this tutorial video for additional help.

The Complement Rule is used when we’re considering an outcome that’s “not” part of an event. It’s similar to the
idea of an opposite: either the event happens, or it doesn’t happen, and complement usually refers to the probability
of an event NOT happening.

For example, suppose I have a Spotify playlist with 50 songs, and 7 of them feature Ariana Grande, and 6 of them
feature
Drake. What is the chance that the next song I play will NOT be Drake?

P(I do NOT play Drake next) = 𝑎𝑙𝑙𝑎𝑙𝑙 𝑡ℎ𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 𝑠𝑜𝑛𝑔𝑠 𝑜𝑛𝑠𝑜𝑛𝑔𝑠 𝑚𝑦 𝑁𝑂𝑇𝑆𝑝𝑜𝑡𝑖𝑓𝑦 𝑏𝑦 𝐷𝑟𝑎𝑘𝑒𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 = 4450

Along the same vein, I could also consider the chance that my next song is NOT by Ariana Grande:

P(I do NOT play Ariana next) = 𝑎𝑙𝑙𝑎𝑙𝑙 𝑡ℎ𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 𝑠𝑜𝑛𝑔𝑠 𝑠𝑜𝑛𝑔𝑠𝑜𝑛 𝑚𝑦 𝑁𝑂𝑇𝑆𝑝𝑜𝑡𝑖𝑓𝑦 𝑏𝑦 𝐴𝑟𝑖𝑎𝑛𝑎 𝑝𝑙𝑎𝑦𝑙𝑖𝑠𝑡 = 4350

Want more? Click this tutorial video for additional help.

Conditional Probability is used whenever you’re considering the probability of an event happening in light of some
other condition also happening. This is a little different from the “AND” case because here, we’re assuming that our
condition, whatever it’s probability is, will have already happened. We can express conditional probability like this:

P(some event will happen, given another already happened) =


𝑃(𝑡ℎ𝑒 𝑔𝑖𝑣𝑒𝑛𝑃(𝑡ℎ𝑒 𝑒𝑣𝑒𝑛𝑡 𝑒𝑣𝑒𝑛𝑡, 𝑤ℎ𝑖𝑐ℎ 𝑡ℎ𝑎𝑡 𝑤𝑒 𝑦𝑜𝑢 𝑎𝑠𝑠𝑢𝑚𝑒 𝑤𝑎𝑛𝑡 𝑡𝑜 𝑎𝑙𝑟𝑒𝑎𝑑𝑦
ℎ𝑎𝑝𝑝𝑒𝑛 ℎ𝑎𝑝𝑝𝑒𝑛𝑒𝑑) )

For example, suppose I have a Spotify playlist with 50 songs, and 7 of them feature Ariana Grande, and 6 of them
feature Drake. Given that an Ariana Grande song just played (that’s our given condition!), what is the probability that a
Drake song will now play, assuming no repeats?

P(Given that Ariana just played, Drake now plays) = 𝑃(𝐷𝑟𝑎𝑘𝑒 𝑤𝑖𝑙𝑙 𝑝𝑙𝑎𝑦𝑃(𝐴𝑟𝑖𝑎𝑛𝑎 𝑎𝑛𝑑 𝐴𝑟𝑖𝑎𝑛𝑎 𝑝𝑙𝑎𝑦𝑒𝑑 𝑎𝑙𝑟𝑒𝑎𝑑𝑦) 𝑝𝑙𝑎𝑦𝑒𝑑) = 67//4950 = 496 *
507 = 300343
Want more? Click this tutorial video for additional help.

Probability Distributions and Random Variables describe the big picture. The random variable is what we’re trying
to measure (i.e. what is the set of outcomes could we obtain from modeling probability?), and the probability
distribution shows all the possible outcomes that could occur within the event.

For example, suppose I have a Spotify playlist with 50 songs, and 7 of them feature Ariana Grande, and 6 of them
feature Drake. If I were to create a probability distribution of everything that could happen when I go to select a single
song to play next, those probabilities could be distributed in the table below as follows:

Outcome: Ariana song plays Drake song plays A song from some artist
(Random variable) other than Drake or Ariana
plays

Probability of this
7/50 6/50 37/50
outcome:
Here, the random variable (what we’re measuring) is the artist of the song we will play next, and the probability
distribution is the set of probabilities at the bottom of the table that make up all possible outcomes. The sum of all
probabilities in a probability distribution is always equal to one (7/50 + 6/50 + 37/ 50 = 50/50 = 1) simply because
something has to be happening: Ariana, Drake or other song.

Want more? Click this tutorial video for additional help.


Check your Understanding!
Probability makes for a powerful set of analysis skills that can support many computer science applications, and
therefore, we want to make sure you practice before moving on! We’ve put together some scenarios below that we’d
like you to think about considering the probability rules just presented.

Birthday Bash.
Suppose that you come from a family of six members: two brothers, a sister, two parents, and of course yourself. You
want to better understand the probability of anyone having the same birthday -- a er all, you don’t want to share the
day with anyone!

(1) First, consider only you and your sister. What is the probability that you both have the same birthday?

(2) What is the probability that you have the same birthday as either of your brothers? (If you make any assumptions
here, please explain them!)

(3) What is the probability that you have the same birthday as both of your brothers? Calculate, and explain how this
is different from the scenario in (2).

(4) What is the probability that you will have the same birthday as one of your parents, but not both?

(5) Suppose that you wanted to find the probability of having the same birthday as at least one family member -
explain in a couple of sentences why this would be more complex to calculate than the earlier scenarios. Then,
calculate this probability.

(6) Construct a probability distribution of your chance of having the same birthday as your family members. Your
model should consider the chance that you might have the same birthday as every family member, the same
birthday as no family member, and everything in between.
(7) Anything else about probability (and/or birthday-related probability) that we DIDNʼT ask you about, but that
you’d be curious to know?

Thanks for answering - please move onto the next section.

Question 2: Matrices and Linear Algebra


(Suggested time: 30 - 40 minutes)

A matrix is like a storage container for data, similar to the idea of an “array” in computer science (if you don’t know
what an array is, no worries!). We place data, i.e. numbers, into matrices to keep them organized, to maintain a certain
order or to perform math calculations on them.

A typical matrix is described by the number of rows (counting downward) and columns (going across the matrix) and
we state its measurements (called “dimensions”) in the form “rows by columns” or (rows x columns). Each data point
in a matrix is called an element. For example:

Want more? Click this tutorial video for additional help.

Adding and subtracting matrices (“matrix” is singular, and “matrices” is plural!) is very straightforward. We add
elements that are in the same position together, and the same goes for subtraction, except we subtract the numbers in
the same position. For example, I would add the element in the first row, second column, in the first matrix with the
element in the first row, second column, in the second matrix. In the example below, these numbers are 2 + 8, which
gives us 10.
Very important to note: the dimensions on two matrices must be the same in order to add them. This means that I
could add a 2 x 3 matrix with another 2 x 3 matrix, but I could not add a 2 x 3 matrix with a 2 x 4 matrix, or a 3 x 2
matrix, etc.

Want more? Click this tutorial video for additional help.

Multiplying matrices is a little more involved than adding or subtracting them. Unlike adding and subtracting,
multiplying matrices does not require the same dimensions on both. Rather, we require the number of columns on the
first matrix to equal the number of rows on the second. For example, if I had a 2 x 3 matrix, I could multiply it with a 3 x
4 matrix because 3 columns on the first = 3 rows on the second. However, I could NOT multiply the 2 x 3 matrix with a 2
x 2 matrix because 3 columns on the first does not equal 2 rows on the second.

Once you are certain that multiplication of two matrices is possible with their given dimensions, you will then multiply
them together. This demo is a lot easier to understand live, so we’d like you to watch this video if you’ve never seen
matrix multiplication before. Go slowly, and rewind if needed. If you have already learned this topic in your math class
or by your own means, please continue.

Vectors: special cases of matrices. A vector is a special type of matrix that is one dimension by n dimensions or n
dimensions by one dimension. In other words, it is either a single row or a single column filled with data in only one
direction. See the vectors below:

Note that it is still perfectly legal to perform matrix multiplication, addition, or subtraction with vectors! For adding
and subtracting, recall that the overall shape must be identical. Thus, I could add a 3 by 1 vector with another 3 by 1
vector. For multiplication, columns on the first must match the number of rows on the second. This means that the
row vector could be multiplied with the column vector (3 by 1 times 1 by 3) or the column vector could be multiplied
by the row vector (1 by 3 times 3 by 1). However, I could not multiply the column vector by itself (3 by 1 times 3 by 1)
because the column in the first is not equivalent to the rows in the second.
Want more? Click this tutorial video for additional help.

Check your Understanding!


Matrices translate into important ideas for data storage and manipulation in computer science! Gaining comfort in
working with matrices can really help you grow both your math and programming skills. We’ve put together some
scenarios below that we’d like you to think about considering the matrix rules just presented.
Birthday Bash, part 2.
Suppose I am planning a birthday party and of course, I want it to be amazing. There are 3 possible locations I am
considering: a national park, an amusement park, or a music concert featuring one of my favorite, nationally-known
artists.

I identify 4 characteristics that are important and rank each location against each other according to personal
preferences. The characteristics I identify are, “cost,” “fun factor for me,” “fun factor for all guests,” and “location.”
The highest in each category earns a “3, ” the lowest earns a “1” and the one in the middle receives a “2.”

A er thinking carefully, I decide that:


---the national park earns a 3 for cost, 2 for fun factor for you, 1 for fun factor for guests, and 2 for location;
---the amusement park earns a 1 for cost, 1 for fun factor for you, 3 for fun factor for guests, and 3 for
location; ---the music concert earns a 2 for costs, 3 for fun factor for you, 2 for fun factor for guests, and 1
for location.

(1) Create a matrix to organize this information, and call it matrix “A.”

(2) Take the same three locations and four characteristics and create a matrix that ranks these preferences for
yourself.
Call it matrix “B.”

(3) The dimensions of these matrices are 3 by 4. Could we perform matrix multiplication on A * B? What about
B * A? Explain/justify your response.

(4) If you added a 4th location to both our matrices, how would that change the dimensions? Would we now be
able to perform matrix multiplication? Explain/justify your response.

(5) A matrix of preferences is a common application when one is trying to make a decision. What other
applications of matrices might exist? What applications of matrices relate to your own personal interests?

The Dot Product. A common application of matrices is multiplying two vectors together, sometimes known as
finding a “dot product.” You might use dot products in a calculus or physics class, which then have applications in
computer science modeling.
Suppose that you have two vectors, one containing the numbers 5, 2, 1 (in that order) and then other containing 4,
2, 6 (in that order).

(1) How might you arrange these two vectors such that you are able to perform matrix multiplication of them? Draw
an image and explain below.

(2) Find the dot product of the two vectors that you arranged above - what are your dot productʼs dimensions? Why
do you think it might look this way?

(3) Suppose that you wanted to multiply one of the vectors above with a 3 by 2 matrix filled entirely of 2ʼs. With
which above vector would this be possible, and why?

(4) Perform the indicated multiplication from part 3 in the space below.

(5) What else about matrices, vectors, or data storage makes you curious? What are you hoping to learn over the
summer about matrices, vectors, and/or data storage if you were to attend AI4ALL?

Thanks for answering - please move onto the next section.

You might also like