TASK 1. Estimate the following probabilities by simulation (we don't want to see any analytical approaches!) In your report explain your code and show your answers. a. You have all the black cards from a normal deck, I have all the red cards. We cach choose one card from our half decks - the highest card wins. But I have managed to sneak out and throw away your 9 Of Clubs! Simulate 1000 games - how many did I win? (Ace is low.) b. There are 87 people on a bus - what is the likelihood that two of them share a birthday? c. How many people would you need to gather together before there is a 90% chance that one of them was born on the Ist Jan?
Q: What is the purpose of the given criteria below in analyzing algorithms for Games? Modularity…
A: The answer is
Q: When you use GRETL, how do you run a model for a generalised least squares guess?
A: INTRODUCTION: GRETL is an open-source statistics tool that focuses on econometrics. For example,…
Q: Consider the following scenario: A high school has 1000 students and 1000 lockers, one locker for…
A: the program is given below:-
Q: Let us assume that the game company has designed a guarantee mechanism to encourage users to pay for…
A: Note : Answering the question in python as no language is mentioned. Task : Simulate the given…
Q: Research the rules and Create a simple Yahtzee game for 3 players. Each player will roll 5 6-sided…
A: Find an implementation below.
Q: Here are the rules of another impartial combinatorial game of removing chips from a pile of chips.…
A: Given: 1.2 Here are the rules of another impartial combinatorial game of removing chips from a pile…
Q: Use a truth table to represent the following statement. Ensure that you explain the steps taken.…
A: Answer: I have given answered in the brief explanation
Q: Q2//Consider The Following Sub Image Below: [10 5 7 7 7 5 3 10 3 Calculate: Mean, Standard…
A: Answer
Q: Let assume 6 balls, 3 white, 2 black and 1 red. Random experiment is selection of three balls with…
A: the solution is an given below :
Q: Consider this Texas Hold 'em poker game system: – 2 to 8 human or computer players – Each player has…
A: Answer
Q: What rule of inference is used in each of these arguments? a) Alice is a mathematics major.…
A:
Q: In the context of the probability experiment just described. Consider the event in which the two…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Consider the tollowing scenario: A high school has 1000 students and 1000 lockers, one locker for…
A: Given, Locker puzzle program
Q: Question 3 What do we mean by Bidirectional Trust between Alice and Bob? 2 Alice Trusts Bob's Key…
A: Here are the explanations:
Q: Prove the following valid using any of the inference rules: Note, the greater than sign stands for…
A:
Q: please try to simulate the probability of rolling a Die with Sample Space* S={1,2,3,4,5,6} and the…
A: The sample space when we for the dice is s = {1,2,3,4,5,6}. Sample space is set of all the…
Q: When should you avoid stalemate by jumping right to the solution? No handwritten replies, and no…
A: A process or group of functions is in a deadlock when they cannot move forward because they are…
Q: onsider this Texas Hold 'em poker game system: ◼ 2 to 8 human or computer players ◼ Each player has…
A: Class diagram The class diagram is the primary building block of object-oriented modeling. It is…
Q: Using matplot write a python program to show plotter with the covid-19 affected people and not…
A: Solution:: def plotGraph(AffectedList): X=['Not affected', 'affected']…
Q: a) Carefully define the null and alternative hypotheses of the x2 test underlying the generation of…
A: Here is the Answer and Explanation:
Q: We want to classify the following new instance by using KNN method. do 2 1. What is the distance…
A: Given table: Instance X1 X2 Y d1 3 4 YES d2 2 2 NO d3 2 4 NO 1) Find distance between d1…
Q: Parameter Scenario p, a large prime 23 a, an integer in {2,3,..., p-2} 3 P=23 and a=3 are published…
A: Given p=23 α=3 a=5 b=9 A=αa mod p=35mod 23 =243 mod 23 = 13 B=αb mod p=39 mod 23 =19683 mod 23=18…
Q: How would you validate a model you created to generate a predictive model of a quantitative outcome…
A: Split your training set into two separate subsets.Train data: Data is used for training to a 70–80%…
Q: Consider the following scenario: A high school has 1000 students and 1000 lockers, one locker for…
A: We need to rearrange the code for given scenario for student locker problem;
Q: Imagine a couple that agreed to meet this evening, but cannot recall if they will be attending the…
A: This is game theory problem: If they cannot communicate, where should they go then followiing…
Q: Write a python program to implement Linear Regression algorithm
A: Here we write code for Linear Regression algorithm, ==============================================…
Q: Consider the following scenario: A high school has 1000 students and 1000 lockers, one locker for…
A: #include "stdafx.h"#include <iostream>using namespace std; int main(){ int lockers[1001]; int…
Q: What is the best case scenario? What is the exact number of operations for the best case scenario…
A: The given algorithm is a 1FOR every row in the array 2 FOR every column in the array 3 IF…
Q: Answer the following questions based upon the training examples shown in table below for a binary…
A: Answer: Our instruction is answer the first three part from the first part and . I have given…
Q: 5-card hand is dealt from a perfectly shuffled deck of playing cards. What is the probability of…
A: By complement, if there are no clubs, that means we have 13 ranks but only 3 suits to choose from,…
Q: Consider the hypothetical scenario below: Date Close Adj Close Purchase Date 1 59.36 8.53 Sale Date…
A: Find the answer with calculation given as below :
Q: Create 5 example scenarios in where we can observe values and ethics.
A: Given:- Create 5 example scenarios in where we can observe values and ethics.
Q: You want to cut a rectangular pan of brownies, made up of n square-shaped brownies, but you can only…
A: You want to cut a rectangular pan of brownies, made up of n square-shaped brownies, but you can only…
Q: Consider the following scenarios. A high school has 1000 students and 1000 lockers, one locker for…
A: Program Approach:- 1. Create the class Main 2. In the main function, Declare arrayUse for…
Q: ong the top-down and bottom-up strategies. Which is more appropriate? Or, do we have another…
A: Introduction: Top-down and bottom-up perspectives are strategies used to examine and pick…
Q: Analyze the worst case, the best case and average cese scenarios while executing the following…
A: The worst case, best case and average case for the Brute force algorithm are as follows:
Q: ou'll be given a situation, and you'll have to come up with a solution to cover it up?
A: Scenarios like this crop up quite often in the real world. Соnsider the sсenаriо: аn exаmрle…
Q: b) When do we do black box testing? What do we test for in black box testing? c) When do we do…
A: b) When do we do black box testing? What do we test for in black box testing? Black box testing is…
Q: Artificial intelligence. In a study about the effect of different doses of a medicament, one patient…
A: Given: Days=5,8,10Dosage=2,3,2,4 Solving this using Linear Regression. The equation is: Y=a+bX…
Q: referring to Diffie Hellman, if the prime q is 353, alpha is 5, random secret key Xa is 110 and…
A:
Q: Colonel Blotto and Count Baloney are opposing commanders in a battle. There are three locations…
A:
Q: create an ERD for following scenario by using crow foot model technique Kangaroos, wombats and…
A: We use: Dash and crow's foot: Minimum one, maximum many (mandatory)
Q: Let's build a simple simulation of Hollywood: each actor would have scores on talent and appearance…
A: To work out the Pearson item second relationship, one should initially decide the covariance of the…
Q: d) Repeat part (b) using the conditional probabilities given in part (c). e) Compare the two methods…
A: According to the information given:- we have to answer only d,and e on the basis of instruction…
Q: A group of 15 students made up of 9 females and 6 males form a committee of 5 What is the…
A: Given data, A group of 15 students made up of 9 females and 6 males We have to form a committee of 5…
Q: we want to find the students who are allowed to retake the final exam according to the following…
A: To fill the values in retake/no retake column using if function, following statement can be used:…
Step by step
Solved in 2 steps
- Subject: Machine Learning Question Number 5 : What are Ensemble Algorithms? Write an algorithm for BOOSTING method. Assume that two individuals offer to sell you their predictive models M1 and M2. The confusion matrices produced by each model are as follows. What is the accuracy of each model? Assuming that precision is of paramount importance in your application, which of the two models would you buy? Why?solve with matlab.suppose that two fair dice are tossed repeatedly and the sum of the two uppermost faces is determined on each toss. what is the probability that we obtain a sum of 3 before we obtain a sum of 7? Please just write matlab code that solves this problem using simulationplease try to simulate the probability of rolling a Die with Sample Space* S={1,2,3,4,5,6} and the probability of each sample point has a 1/6 chance of occurring, i.e., you need to verify that your simulation converges to 1/6 when you select one point of sample space. When X is a random variable for sample point of rolling a Die, Pr(X<=4)=2/3. Please verify this result by simulation. Please let me know how to make an Excel file as stated above.
- In this assignment, you will need to write an agent that uses logical inference to find the answers to the givenquestions based on the data given in the below table:1. Python Code Filename: ID.py ID Name GPA Program City 123 Ahmed 3.56 BS-CS Gujranwala 456 Zahid 2.85 BS-SE Lahore 789 Baber 3.70 BS-DS Gujranwala 321 Shahid 2.99 BS-CS Gujranwala 654 Jamal 3.33 BS-DS Lahore Use the given code puzzle.py and amend the code so that it finds the answer to these questions:a. Who lives in Lahore?b. Who studies in the BS-DS program?c. Who has the minimum GPA and who has the maximum GPA? You are restricted to using only the kanren logical AI library and the given code for the LogicalProgramming lectures. You may use any mathematical library (if needed) for any math related work.2. Write a report (ID.pdf) that describes the logic of your solution. Make sure to describe all main steps thatyour code uses to find the answers of the given questions. puzzle.py; from kanren import…Write a program that calculates (using a Monte Carlo simulation) what the probability is that two bishops, randomly placed on an 8 by 8 chessboard, are in an attacking position? On a chessboard, bishops can move in a diagonal line. So two bishops are in attacking position if they both sit on the same diagonal line. On the 8x8 chessboard below, B1 and B2 are in attacking position. B3 is NOT in attacking position of either B1 or B2. B4 and B1 are also in attacking position to each other. But B4 is not in attacking position to B2, or B3.Implement an algorithmic solution, indicating which states are valid and which are not, and model the space of the following problem: An interest group from a small town decided to sue a company for commercial abuse. For this, the people have organized themselves and decided to send 3 representatives, who will have to travel in a Van to the city where the lawsuit will be filed. The company to be sued, upon learning of these actions, has decided to send 3 lawyers to persuade the representatives, who will also travel in the same Van for that purpose. The community must file the class action suit under these conditions: - The three applicants must reach the destination city; - Only two people can travel per trip in the Van (small town - city, city - small town); - There can never be more lawyers than plaintiffs in any one place (either in the small town or city) because the lawyers can persuade the plaintiffs and as a consequence, the lawsuit would not be made; - The Van cannot be…
- Using R, Use the Monte Carlo simulation to estimate the probability that all six faces appear exactly once in six tosses of fair dice.Assume we have a game that uses synchronized simulation. If we want to extendthe game by including new players, which will become the limiting factor first: thenumber of human players or the number of synthetic players?Assume a very good NBA team has a 70% chance of winning in each game it plays. Use simulation to answer these questions, where each iteration of the simulation generates the outcomes of all 82 games. Use simulation with 10,000 iterations to answer the questions. For part a, write your numerical answer with no decimal or commas (e.g., if your computed answer is 101,021.128, write your answer as 101021). For part b, write your probability answer to two decimal places with a leading 0 (e.g., write a probability of 90.02% as 0.90). a. During an 82-game season what is the average length of the team's longest winning streak? The average length of the winning streak is . b. What is the probability that the team has a winning streak of at least 16 games? The probability is
- Fill in the bubbles for ALL correct choices: there may be more than one correct choice, but there is always at least one correct choice. Which of the following are true for the k-nearest neighbor (k-NN) algorithm? A: k-NN can be used for both classification and regression. B: As k increases, the bias usually increases. C: The decision boundary looks smoother with smaller values of k. D: As k increases, the variance usually increases.Simulated annealing is an extension of hill climbing, which uses randomness to avoid getting stuck in local maxima and plateaux. a) For what types of problems will hill climbing work better than simulated annealing? In other words, when is the random part of simulated annealing not necessary? b) For what types of problems will randomly guessing the state work just as well as simulated annealing? In other words, when is the hill-climbing part of simulated annealing not necessary? c) Reasoning from your answers to parts (a) and (b) above, for what types of problems is simulated annealing a useful technique? In other terms, what assumptions about the shape of the value function are implicit in the design of simulated annealing? d) As defined in your textbook, simulated annealing returns the current state when the end of the annealing schedule is reached and if the annealing schedule is slow enough. Given that we know the value (measure of goodness) of each state we visit,…There are N people numbered from 1 to N around a round table. Everyone has a different number in their hands between 1 and N. We start with the first person and count the number in his hand and ask the related person to leave the table. If the number in the card odd, we count clockwise. if it is even, we count counterclockwise. Ensure that all people leave the table. The first person to leave the table is the first person. In the sample scenario, the first integer value in the table_in.txt file indicates the number of people around the table, it is 5. The value of the card in the first person’s hand is written on the next line, it is 3. The value of the second person’s card is written on the next line, it is 1. In the table_out.txt file, print the order of people leaving the table. Sample scenario: table_in.txt 5 3 1 2 2 1 table_out.txt 1 4 2 3 5 Constraints N < 1,000,000 Do the solution in C/C++ with the Doubly Circular Linked List. Your codes should also be able to…