## Saturday, September 17, 2016

### EDX 6.008.1X Computational Probability and Inference Notes (Week 1)

EDX 6.008.1x Computational Probability and Inference Notes (Week 1)

Recently, I started doing the EDX 6.008.1x Computational Probability and Inference online course on EDX. This course is offered as part of the MITx and is similar to the MIT 6.008 Introduction to Inference course offered at MIT by Prof. Polina Golland. As a way to motivate myself keeping on track with the course, I decided to save my notes on the course content and publish them online. I hope you they can be useful for other students who are doing the course now, or in later sessions, and for anyone looking for information about topics related to the course subjects.

#### Course topics:

The course provides an introduction to probability theory and probabilistic graphical models and how to use to perform inferences. Probabilistic models are used in different application domains including information retrieval, data mining, computer vision, natural language processing, financial analysis, robotics, medical diagnosis, …….. The list goes on and on.

In addition to the theoretical topics covered by the course, it also includes 3 mini projects and one final project in Python programming language.  The programming assignments and project were a strong reason for me to decide doing this course :)

#### Course Requirements

The course assumes good knowledge of calculus and being comfortable with python programming language. No prior knowledge of probability is required.

# Week 1

## What is probability?

Probability is the science of representing and computing with uncertainty. It appears in our everyday life, especially when making decisions. For example, In the morning you may decide to take an umbrella because there is high chance that it will rain today.

The goal of the course is to learn how to build computer programs that can perform reasoning under uncertainties by using probabilities.

Simplest example of probability is flipping a fair coin, fair coin is a coin that has equal chance of landing heads or tails when being tossed, the probability of head = ½ and the probability of tail is also ½.  But what does this mean ?

There is two interpretations for probability:

Frequentist interpretation: If you repeat the process of tossing the coin for N times (where N is a very large number, say 10,000 times), Approximately N/2 times the result will be heads and approximately N/2 times the result will be tails.

Bayesian Interpretation: It is hard to use the frequentist approach to explain the meaning of probability in some scenarios where the experiment cannot be repeated. For example, the probability that the a patient will die after being given a certain drug. Of course, this experiment cannot be repeated more than one time. Therefore, the frequentist approach does not help a lot in this scenario. The bayesian interpretation of probability is the that probability value is equal to the state of belief in the experiment outcome.
For example, the probability of heads when tossing a coin = ½ means that if you toss a coin once, then before tossing the coin your belief that the result will be heads is equal to ½.

Luckily, it does not make any difference which interpretation you choose to follow, because all probability laws are the same under the two interpretations.

## Two ingredients to model uncertainty

When we represent an uncertain world, we call the process that we observe its result an experiment. To model the uncertainty of the experiment we need to define two things:

• Sample Space : The set of all possible outcomes of the experiment. The sample space can be either finite or infinite set.
• Probability of each outcome: Define a probability function that assigns a probability value for each possible outcome .
For example, in the experiment of tossing a fair coin:
• Sample space:
• Probability values:

Any subset of the sample Space is called an Event.

The probability of an event   is the sum of probabilities of the possible outcomes that belong to .

### Programming Note: representing a probability model

The course recommends using the Python dictionary to represent a probability model, where the keys of the dictionary are the elements of the sample space and the values assigned to them are their probability values.
Example: representing the probability model of a fair coin.
 model = {'heads' : 0.5, 'tails' : 0.5}

The following can be used to sample 10 outputs from the preceding model

 import numpy as npitems, p_values = zip(*model.items())samples = np.random.choice(a = items, size = 10, p = p_values)

### Three axioms of probability

The probability value assignment has to comply with the following three rules (known as three axioms of probability)
• If A and B are disjoint events ( ) , then

## Random Variables

Random variables, strangely enough despite their name, are functions that map the experiment outcomes to another set of  values.
The course uses the python dictionary to represent a random variable that maps a finite sample space to another finite set of values.

 weather_model = {'sunny': 0.7, 'rainy' : 0.25, 'snowy': 0.05} random_variable_mapping = {'sunny': 1, 'rainy' : 1, 'snowy': 0 }

1. very nice
keep on

2. +1 I hope you keep going. I'm in class but it will take every resource I can find to make it through :)

3. Get guidance for your dream career | Fair & Lovely Foundation

Dream of becoming a School teacher, Hair Stylist or Software Programmer? View over 61 Career Options and learn what you need to study.
Get Free Career Guidance here.

4. nice Blogs
Great Information.
VLCC VANITYCUBE Beauty At Home Beauty & Wellness Services, offers a wide range of beauty services at your doorstep.

5. Thanks for sharing is so amazing and helpful to us.

6. Best Article buy Pain Pills online Excellent post. I appreciate this site. Stick with it! Because the admin of this web page is working, no doubt very quickly it will be well-known, due to its quality contents.This website was how do you say it? Relevant!! Finally, I’ve found something that helped me.
Best Article buy Roxicodone online Excellent post

Best Article buy Pain Medications online Excellent post. I appreciate this site. Stick with it! Because the admin of this web page is working, no doubt very quickly it will be well-known, due to its quality contents.This website was how do you say it? Relevant!! Finally, I’ve found something that helped me.

7. Thanks a lot for sharing
Having good health is what most people out there wants but can not achieve. some people takes buy ibogaine online AND buy weed online to get it.

8. Welcome to Scottish Fold Cattery and thanks for your interest click here to Adopt A Scottish Fold Kitten online to our scottish cats and kittens For sale! My name is VERA S. Matt. Me and my husband Owns the small scottish fold farm with the best Scottish fold kitten prices and share my biggest hobby/ Scottish Fold Kittens For Sale cat breeding hence scottish fold Breeders. We breed breeds Scottish Folds. All our Scottish Fold cats have very special Grand Champion blood lines from Europe . We love our cats, they live in the Cattery with us.Scottish Folds are known to be very good natured, affectionate cats who are very human-orientated and become extremely attached to their owners.here Scottish Fold Cats They are easy going and will appreciate the company and cubby holes of any type. They enjoy attention and are not usually shy with strangers. Affectionate without being “pushy”,they make ideal pets and companions.scottish cats and kittens For saleBrowse through our available scottish fold cats and see the Munchkin Scottish folds,Grey Scottish fold kittens,Black scottish fold kittens Since we offer shipping worldwide.Scottish Fold kittens breederKittens For Sale at the catter.Scottish fold kitten prices We also offer Scottish fold kittens near me,Scottish Fold Breeders,Scottish fold Price.
Buy passport online We are a group of unique experts who manufacture real and fake passports, IDs, buy driver’s licenses and other documents proving your identity or qualification. We have many years of experience in this field that’s why you can be absolutely sure that no matter what you order from us, you will always receive a high-quality document that meets the necessary…buy IELTS certificate online

9. Despite the fact that Adderall is viewed as a physician recommended tranquilize and most patients
buy adderall online,Buy Adderall Uk & USA on the web or purchase Adderall 30mg from an online drug store, a few patients will in general get dependent on the medication.can you buy adderal online? When it comes to buying fine research chemicals online, quality is the key. buychemstore research chemicals for sale ,LSD for sale,constantly strives at providing you with the continuing evaluation, innovation . We assure you the highest degree of confidence in all of our products not limited to but including cocaine for sale, LSD for sale, heroin for sale, pain medications for sale etc. Here at buychemstore, we pride ourselves on safety.
We are a one-stop-shop for the purchase of anabolic steroids.what is anabolic steroids, We are here to make sure you don’t bother about where to buy anabolic steroids from craigslist, eBay, or any other online forums. We are in contract with a large network of pharmacies in North America, Europe and Asia. With our years of experience in the distribution of anabolic-androgenic steroids, we provide top quality services to our clients that cannot be matched by our competitors.This is te best place to Buy legal steroids online, anabolic steroids for sale
buy Apetamin vitamin syrup that’s marketed as a weight gain supplement. It was developed by TIL Healthcare PVT, a pharmaceutical company based in India.According to manufacturing labels, 1 teaspoon (5 ml) of Apetamin syrup contains.Apetamin in store,where to buy Apetamin,Is Apetamin syrup Effective in weight gain,buy Apetamin syrup online
Welcom to our vyvanse online shop where you can buy vyvanse online,Buy vyvanse Uk & USA,learn about vyvanse side effects and have
vyvanse coupon,vyvanse for sale.
Buy atorvastatin, sold under the trade name Lipitor among others, is a statin medication used to prevent cardiovascular disease in those at high risk and treat abnormal lipid levels. For the prevention of cardiovascular disease, statins are a first-line treatment. It is taken by mouth.Learn How to use Lipitor, you are free to read about atorvastatin side effects,Buy lipitor UK ,atorvastatin side effects ,
lipitor for sale. You can also buy juul

10. dank vapes are the best brand of vape cartridges in the market. These dank vapes cartridges have however suffered a backlash in the recent weeks with multiple reports on how these dank vapes carts cause cancer and other related lung disease.
dank vapes cart however remain one of the best cartridges. dank vapes are sold in multiple states over the USA. dank vapes cart compost one of the black markets finest vape products. But this backlash has caused a fall in the consumption of the vape by adults.The 710 Kingpen brand is also on the rise in market demands as well as skywalker OG products.
Recently juul pods also faced a similar backlash. juul starter kits have also fallen in market demand. mango juul pods are refillable juul pods and can be gotten as juul pods bulk. juul skins and juul accessories all come with the juul kits.

kitten online
We are a small and loving cattery . We are pleased that you have chosen to visit our Ragdoll

cats/Ragdoll kittens cattery, and hope you will notice right away from our website how beautiful and loved our

Ragdoll cats and kittens are. These beauties are easily integrated into our loving family home, first as

mothers carrying the litters, and then from the time the ragdoll kittens are born until they are adopted so we

always have Ragdoll kittens for sale|Ragdoll kittens for adoption|Ragdoll kitten price|Ragdolls|Cost of Ragdoll

kittens|. Our adult cats have tested negative for HCM and PKD1 through University of California Davis. Upon

request, we have five generations of pedigree documentation on our adults available to anyone who is

interested. Ragdoll kittens are registered with The International Cat Association (RAGDOLL KITTENS FOR SALE),and are never caged. The cats that are

in our reputable breeding program can produce mink, sepia and traditional Ragdoll kittens. Ragdolls have a

laid-back personality and enjoy being physically handled making them one of the best lap cats! We are all

family here at Ragdoll kittens cattery since we are ragdoll kitten breeders and all the love we bestow by

holding each cat and kitten daily further Teacup RAGDOLL Kittens

for sale|Hypoallergenic kittens for sale
nurtures their loving personalities and temperaments,TICA/CFA REGISTERED RAGDOLL KITTENS FOR SALE thanks for adopting a

ragdoll ketten from us

Welcome to our farm where we breed Registered pomeranian puppies

for sale
.As a registered pomeranian puppies breeder, we have made it possible for pomeranian puppy lovers

to
buy pomeranian puppies online,buy zwergpitz pomeranian from our family run farm. Pomeranian

dogs are small dogs with a weight of 1.36 to 3.17 kg and a withers height of 15 to 18 cm. They are compact but

robust dogs with a lush, textured coat and a tall and flat tail. The top coat forms a fur ruff on the neck, for

which poms are known, and on the hindquarters they have a margin of feathered hair.You can click HERE to view our available pomeranian puppies

12. Welcome to Scottish Fold Cattery and thanks for your interest click here to Adopt A Scottish Fold Kitten online to our scottish cats and kittens For sale! My name is VERA S. Matt. Me and my husband Owns the small scottish fold farm with the best Scottish fold kitten prices and share my biggest hobby/ Scottish Fold Kittens For Sale cat breeding hence scottish fold Breeders. We breed breeds Scottish Folds. All our Scottish Fold cats have very special Grand Champion blood lines from Europe . We love our cats, they live in the Cattery with us.Scottish Folds are known to be very good natured, affectionate cats who are very human-orientated and become extremely attached to their owners.here Scottish Fold Cats They are easy going and will appreciate the company and cubby holes of any type. They enjoy attention and are not usually shy with strangers. Affectionate without being “pushy”,they make ideal pets and companions.scottish cats and kittens For saleBrowse through our available scottish fold cats and see the Munchkin Scottish folds,Grey Scottish fold kittens,Black scottish fold kittens Since we offer shipping worldwide.Scottish Fold kittens breederKittens For Sale at the catter.Scottish fold kitten prices We also offer Scottish fold kittens near me,Scottish Fold Breeders,Scottish fold Price.
Buy passport online We are a group of unique experts who manufacture real and fake passports, IDs, buy driver’s licenses and other documents proving your identity or qualification. We have many years of experience in this field that’s why you can be absolutely sure that no matter what you order from us, you will always receive a high-quality document that meets the necessary…buy IELTS certificate online

WELCOME TO pug puppies BREEDERS HOME BUY A PUG ONLINE|PUG PUPPIES FOR SALE|ADOPT A PUG ONLINE|PUG|BLACK PUG PUPPIES FOR SALE
We are so glad you stopped by to check out our amazing TEACUP Pug puppies. All of our animals come fully up to date on vaccinations, heart-worm tested negative, and de-wormed, as well as neutered, and treated for any ailments found upon veterinary examination Adopt a teacup Pug puppy
Ownership of a Pug includes a commitment that is wider in scope than providing doggy necessities and allowing this jovial little pet to occupy a portion of your home. Pug ownership is a give-and-take relationship that will continue throughout the little dog’s life. That enjoyable companionship thrives when each member of the pair respects the other and camaraderie rules the union. Your Pug will entertain you, love you, and be obedient and faithful to you if you spend time with your doggy friend.
Adopt a pug puppies online puppy onlie or pug puppies for sale online does not all depends on the money involve. You have to love
Black pug puppies for sale at heart before you go in search of pug puppies for sale or adopt a pug puppy.This means that you have to keep the pug puppy price or cost of a pug puppy or a teacup puppy in mind before you harnest the interest of buying a pug online.

13. medical care is what many people lack in the interior areas of the world. people face a lot of health issues everyday without solution. buy psychedelics online, Buy weed online, Buy fantanyl patches online

14. Nowadays, getting a doll from a Sex Dolls Shop discreetly has been quite a challenge.
Big Boobs Sex Dolls for Sale Online is not a common phenomenon in the industry.
Fantasy and Anime Sex Dolls for Sale are now the official leading trend in the dolls industry. Similar to buying from a
Discreet Guns Shop

15. We are Professional IT technicians and we produce SUPER UNDETECTED COUNTERFEIT MONEY for all currencies and SSD CHEMICALS SOLUTION , fell free to visit our SHOP anytime.

16. Buy JUUL Pods online today and improve on your smoking habits with our Nicotine JUUL Pods and Vaporizers. Everybody’s JUUL experience is different but nevertheless outstanding. Our brand is among the leaders in Nicotine Vape Cartridges. Order our JUUL Pods and JUUL devices today and become a part of the healthier and safer smoking family.

17. Get Cannabis Grade AA++ online at reduced prices. "Better quality reduced price".Please Stay safe Quality Weed Store

18. The grand stribog or call it Stribog is a top selling model just like the glock 19x,glock 19 and glocks in general.So looking for a glockstore or glock store to buy glocks online then you can check out the latest vast collection of pistols like the Grand power stribog sp9a1,Grand power stribog gen 2,Stribog gen 2,stribog 9mm,Grand power stribog brace,Springfield XDs,grand power stribog a3, Our glockstore has top selling vortex optics and magazines too like the vortex,viper,riflescopes,vortex viper.vortex binoculars,red dots vortex venom Feel free to browse through our great collection .

19. The vaping industry have always been on a varible caused by customers preference through the brand they find

confortable and safe consuming, With juul pods taking over the vape

market, vapers with the high zeal to buy juul pods online and other

thc vape cartridges frequently search for juul pods near me, cbd juul

pods
,juul compatible pods buy juul pods online, juul pod flavors,

juul pods.A greater proportion of juul vapers have rated juul mango,juul mint and juul menthol as the best juul

flavors
among others, that not withstanding there are other pods which are juul compatible and refillable with

vape juice.Are you loolking for a vape shop near

me
or near you to buy the best vape juice such as nicotin salts suitable for small devices, pod systems and vape mods?THC cartridges containing cbd vape

oil
brings you a great vaping experience.Though vaping cbd vape oil also help for canacer,its is the best

option to use cbd oil for pain, cbd oil for cancer. To facilitate your online search to buy cbd oil online, search for cbd oil

near me
.Buying cheap vape juice online is very simple when you

serach for vape store near me, vape

shop near me
.

20. Jungle boys is an award winning Marijuana brand from Los Angeles. The Jungle boys farm is an authorized and licenced kush grower and distributor.
Jungle boys also comprise of a jungle boys clothing brand with fabrics such as hoodies, caps, t shirts and sucks.
The Jungle boys kush strains are wwide spread across both sativa, hybrid and indica species. Jungle boys indica fire brands are usually recommended to patients with medical conditions such as insomnia.
Jungle boys strains such as the Sin mints, Zack pie ,Jungle mints, Jungle boys,
Jungle apples , Jungle boys frosted cake , Jungle boys hippy crasher and Motor breath are best sellers of the brand.
buy Jungle boys online at wholesale prices from the Jungle boys farm.
paxerapods.org , dankwoods

21. Thanks for this.

buy weed online in Legit Weed UK

order your cannabis now Our Online Shop

Buy marijuana online at The Best Marijuana Store

Buy medical cannabis online Almost Free

Get your Pill refills at Cheap Price

Köp piller online i Sverige kl Mundi Pharmacy

Köp Oxycontin Online Billigt på Scandinavia Stockholm

Billiga piller och steroider till salu på Battrehalsa Apotek

22. Tack Köp legit piller online i sverige på halsovard apotek.

23. It is important for theology & religion writing service students to seek Religion & Theology Research Writing Services from a reputable theology & religion research paper service provider for their custom theology & religion assignment writing services.

24. Vape carts 4 all specialize in the very finest, pharmaceutical-grade, Organic & Vegan Cannabis and cartridges. We deliver it straight to your home across the globe. Source your medicinal cannabis products with peace of mind, from our all vegan, strictly organic and pesticide-free menu.
west coast extract vape carts
krt carts solvent free web site
krt carts sovent free
krt vape cartridges
krt dab carts
curepen
cali gold extract
Cali gold carts
Cali gold extract cartridge 24k
brass knuckles jack herer
tahoe og brass knuckles

25. Business Management coursework writing service learners have an advantage of hiring the best business research writing service that is familiar with business term paper writing services for their Business Essay Writing Services.

26. Thanks buy quality weed online lifeaid pharma

Thanks buy quality pills online topbud shop

Order top bud online cali kush dispensary

Tack Köp legit piller online i sverige på mofotia potek medicin.

27. Vaping is an easy way to consume both thc and cdb oils. Pre-filled marijuana vape cartridges are easy to use, easy to dose, portable and convenient way to consume marijuana which is preferred by many marijuana patients today. For our patients seeking a discreet way to medicate, THC Vapes Carts And Pods is fortunate to present THC oil filled and pre-filled cartridges. Ranging in strain type and THC levels, you’ll find several brand options for patients below. We work with local companies to ensure that we can present the best price and best quality CBD oil vapes cartridges online for our patients.

thc vape carts for sale
vape shop
thc vape cartridge for sale
order thc vape carts online
wholesale vape carts
thc carts for sale
where to get thc vape carts online
thc vape carts
vape oils for sale
pre-rolls for sale
wholesale pre-rolls
juul shop online
juul pods for sale near me
vape shop near me
vape carts for sale near me

28. Buy counterfeit online Docs and Counterfeits Buy weed online   Mister Cannabis Online

29. Thanks for this. I really appreciate your good work

content so valid. keep up i love this

so much meaning. I enjoyed my self

I cant neglect. Reading such a content

Ethical facts. one just cant neglect

I always appreciate. Valid content

Never a dull. moment reading online

I have learned. A new thing today

nothing is so meaningful. like reading a good content

30. Thankѕ for another informative website. Where else may I get that type of information written in such an ideal means? Ӏ have a miѕsion that I'm just now working on, and I've been at the glance out for such info.
CZ P-01 9mm

31. 24K Monkey Classic Incense 10g
Bizarro Incense
Crazy Monkey Incense
k2 spray on paper
k2 paper sheets
Klimax Potpourri 15xxx Coconut(10g)
Crazy Monkey Incense
Buy Pure Fire Herbal Incense Online
Buy Kisha Cole Incense (11g) online
Buy Platinum XXX Herbal Incense online
Buy OMG HERBAL POTPOURRI 10G online

32. Thanks for sharing What an interesting site you have i really take a good look buy cocaine online and you can also take a good look at our blog too for more information buy crack cocaine online we also recommend you to take a good look at this site too they have good content buy mdma crystals online more of the site still want you to take a closer look too as they have really good content buy crystal meth online thanks for using your time to check on the link .order cocaine online

33. If you're found with just a hitter pipe, the statute is unclear on what sentence to impose: First, if they will prove their elements (that you were getting to use the pipe for the needs of introducing cannabis to your body), albeit they are doing not have any traceable amount of cannabis within the pipe, it'll likely be considered a category A misdemeanor because the paraphernalia statute making it a civil violation is merely "triggered" if the person violates subsection (a) of Section 4 of the Cannabis Control Act (possessing no but 10 grams of cannabis). It doesn't seem the legislature meant to form possessing a hitter pipe with no cannabis more serious than possessing a hitter pipe with cannabis, but alas, these are the issues that we see so far with this language within the new law.

k2incenseonlineheadshop Buy liquid incense cheap Buy liquid incense cheap For Sale At The Best Incense Online Shop

35. https://bestmjstrainsonline.com/

Buy liquid incense cheap | cheap herbal incense | buy k2 E liquid | k2 spray
Description
Buy liquid incense cheap . cheap herbal incense . buy k2 E liquid . buy k2 paper spray online . buy herbal incense online . buy k2 spice online

Buy K2 Infused paper spray online, order K2 Spray online +1 (925) 526-5453

https://bestmjstrainsonline.com/product-category/infused-drugs-on-paper/

https://bestmjstrainsonline.com/product/5-co2-cannabis-oil-cartridges/

36. https://syntheticworldwide.com/
sales@syntheticworldwide.com

37. What a good blog you have here on how to buy Vyvanse online medication. There are many order Vyvanse online
pharmacy websites that operate legally such as buy adderall XR online and offer convenience, privacy, and safeguards for purchasing buy oxycodone online medications. Also, these medicines may not have been stored properly . So always look out Buy Keifeitropin 140iu Online for details .

38. https://www.cocainehydrochloride.comWhat an amazing blog you have here Cocaine for Sale thank you for sharing this real good content buy colombian cocaine online will like to also say we have an amazing blog too if you will love to take a look buy peruvian cocaine online thanks for your time to check on our blog. Today cocainehydrochloride is one of the world-leading buy cocaine online manufacturers in the USA . for you to order cocaine online , there is a variety of cocaine websites you can purchase and have it delivered Worldwide . And Yes, you can buy crack cocaine online illegal drugs on the Internet, and it's a lot safer .

39. Hi there,