1. sum and product rules of probability ⎧⎩⎨p(x)=∫p(x,y)dyp(x,y)=p(x|y)p(y) sum rule of probability 的积分符号自然可以换成 ∑ 求和符号(针对离散型随机变量) 2. 简单应用 sum and product rules of probability in Bishop's book sum and product rules of probability 证明:p(x=1|D)=∫10p(x=1|μ…
Sum vs Product Time Limit: 4000/2000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others) SubmitStatisticNext Problem Problem Description Peter has just learned mathematics. He learned how to add, and how to multiply. The fact that 2 + 2 = 2 × 2…
Sum vs Product Time Limit: 2000/1000MS (Java/Others)    Memory Limit: 128000/64000KB (Java/Others) Submit Status Problem Description Peter has just learned mathematics. He learned how to add, and how to multiply. The fact that 2 + 2 = 2 × 2 has amaze…
Chapter 1.6 : Information Theory     Chapter 1.6 : Information Theory Christopher M. Bishop, PRML, Chapter 1 Introdcution 1. Information h(x) Given a random variable and we ask how much information is received when we observe a specific value for thi…
题意:ACM比赛中,共M道题,T个队,pij表示第i队解出第j题的概率 ,求每队至少解出一题且冠军队至少解出N道题的概率. 析:概率DP,dp[i][j][k] 表示第 i 个队伍,前 j 个题,解出 k 个题的概率,sum[i][j] 表示第 i 个队伍,做出 1-j 个题的概率,ans1等于, T个队伍,至少解出一个题的概率,ans2 表示T个队伍,至少解出一个题,但不超过N-1个题的概率,最后用ans1-ans2即可. 代码如下: #pragma comment(linker, "/STA…
题意:有n个球,其中有0.1.2...n个黑球的概率是相等的,现在从中取出L个球,p个黑球q个白球.现在问猜一个黑球的区间,使得落在这个区间的概率大于给定的一个数值. 详见代码: #include <cstdlib> #include <cstring> #include <cstdio> #include <iostream> #include <algorithm> using namespace std; int n, p, q, pri;…
The Basics of Probability Probability measures the amount of uncertainty of an event: a fact whose occurence is uncertain. Sample space refers to the set of all possible events, denoted as . Some properties: Sum rule: Union bound: Conditional probabi…
隐马尔科夫模型HMM(一)HMM模型 隐马尔科夫模型HMM(二)前向后向算法评估观察序列概率 隐马尔科夫模型HMM(三)鲍姆-韦尔奇算法求解HMM参数(TODO) 隐马尔科夫模型HMM(四)维特比算法解码隐藏状态序列(TODO) 在隐马尔科夫模型HMM(一)HMM模型中,我们讲到了HMM模型的基础知识和HMM的三个基本问题,本篇我们就关注于HMM第一个基本问题的解决方法,即已知模型和观测序列,求观测序列出现的概率. 1. 回顾HMM问题一:求观测序列的概率 首先我们回顾下HMM模型的问题一.这个…
UVa11021 Tribbles 你有K个麻球.一个只会存活一天.在死亡之前,一个麻球有P_i的概率生出i个麻球(i=0,1,…,n-1).m天后所有麻球都死亡的概率是多少?(包含在第m天前全部死亡的情况) 麻球之间是独立的,只算一个麻球就行了 直接枚举生出几只麻球算概率 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cm…
Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Input:nums = [1,1,1], k = 2 Output: 2 Note: The length of the array is in range [1, 20,000]. The range of numbers…