The five most common words appearing in spam emails are shipping!, today!, here!, available, and fingertips!. Many spam filters separate spam from ham (email not considered to be spam) through application of Bayes' theorem. Suppose that for one email account, in every messages is spam and the proportions of spam messages that have the five most common words in spam email are given below.
shipping! 0.050
today! 0.047
here! 0.034
Available 0.016
fingertips! 0.016
Also suppose that the proportions of ham messages that have these
words are
|
shipping! |
0.0016 |
|
today! |
0.0021 |
|
here! |
0.0021 |
|
available |
0.0041 |
|
fingertips! |
0.0010 |
Round your answers to three decimal places.
If a message includes the word shipping!, what is the probability the message is spam?
If a message includes the word shipping!, what is the probability the message is ham?
Should messages that include the word shipping! be flagged as spam?
b. If a message includes the word today!, what is the probability the message is spam?
If a message includes the word here!, what is the probability the message is spam?
Which of these two words is a stronger indicator that a message is spam?
Why?
Because the probability is
c. If a message includes the word available, what is the probability the message is spam?
If a message includes the word fingertips!, what is the probability the message is spam?
Which of these two words is a stronger indicator that a message is spam?
Why?
Because the probability is
d. What insights do the results of parts (b) and (c) yield about what enables a spam filter that uses Bayes' theorem to work effectively?
Explain.
It is easier to distinguish spam from ham when a word occurs in spam and less often in ham.
In: Statistics and Probability
The five most common words appearing in spam emails are shipping!, today!, here!, available, and fingertips!. Many spam filters separate spam from ham (email not considered to be spam) through application of Bayes' theorem. Suppose that for one email account, in every messages is spam and the proportions of spam messages that have the five most common words in spam email are given below.
shipping! 0.050
today! 0.047
here! 0.034
Available 0.016
fingertips! 0.016
Also suppose that the proportions of ham messages that have these
words are
|
shipping! |
0.0016 |
|
today! |
0.0021 |
|
here! |
0.0021 |
|
available |
0.0041 |
|
fingertips! |
0.0010 |
Round your answers to three decimal places.
If a message includes the word shipping!, what is the probability the message is spam?
If a message includes the word shipping!, what is the probability the message is ham?
Should messages that include the word shipping! be flagged as spam?
b. If a message includes the word today!, what is the probability the message is spam?
If a message includes the word here!, what is the probability the message is spam?
Which of these two words is a stronger indicator that a message is spam?
Why?
Because the probability is
c. If a message includes the word available, what is the probability the message is spam?
If a message includes the word fingertips!, what is the probability the message is spam?
Which of these two words is a stronger indicator that a message is spam?
Why?
Because the probability is
d. What insights do the results of parts (b) and (c) yield about what enables a spam filter that uses Bayes' theorem to work effectively?
Explain.
It is easier to distinguish spam from ham when a word occurs in spam and less often in ham.
In: Statistics and Probability
PLEASE DO IN JAVA
4.15 Palindrome
A palindrome is a string that is the same spelled forward as it is spelled backward. So, "abcba" is a palindrome, as are "eye" and "madam". This program takes as input from the user, a string and outputs whether the string is a palindrome.
(1) Modify the given program to use a loop to output the string one character at a time. (1 pt)
Example output for word = radar:
Word Entered: radar r a d a r
(2) Now modify the program to use a loop to output the string in reverse order one character at a time. (2 pt)
Example output for word = read:
Word Entered: read r e a d Word Reversed: d a e r
(3) Finally, modify the program to check character-by-character the string given by the user to see whether or not the string is a palindrome, and then prints either "Yes" or "No". For example, if the input string is "abba" or "rotator", the output would be "Yes". If the input string is "cat" or "garbage", the output would be "No". You may ignore punctuation, in that the test strings used for this program do not contain any. You may also assume all lowercase letters will be used in the test strings.
Note: The strings may be of odd or even length, as in "cat", "dad", "racecar", or "hannah". (8 pt)
Example output for word = radar:
Word Entered: radar r a d a r Word Reversed: r a d a r Yes
import java.util.Scanner;
public class Palindrome {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
/* Your Code Here */
return;
}
THANK YOU SO MUCH
In: Computer Science
|
Consumer Type |
PowerPoint |
Excel |
Word |
|
Accountants |
$60 |
$175 |
$75 |
|
Marketing/Sales |
$125 |
$80 |
$135 |
|
Administrative Assistants |
$75 |
$100 |
$140 |
The above table contains the maximum prices different types of consumers are willing to pay for three software titles: PowerPoint, Excel and Word. Suppose there are 100 consumers of each type.
a. (6 pts) Which of the following three strategies has the chance of generating the highest revenue for Microsoft?
Support your answers with revenue estimates for each
strategy.
Strategy A. Charge a single price of $315 for the bundle of
PowerPoint, Excel and Word
Strategy B. Charge $60 for PowerPoint, $80 for Excel and $75 for
Word
Strategy C. Charge $125 for PowerPoint, $175 for Excel and $140 for
Word
The best strategy among A, B, and C is…
b. (4 pts) Can you suggest a strategy that would produce higher revenue that any of the above three strategies? Support your answer with numbers.
In: Economics
Using SQL, write a table-valued function that:
-- takes a space delimited string as input (Input string will be a sentance ex: "The cat is on the chair and the bear is on the chair")
-- returns a table (word varchar(max), count int) (Output is a table that shows how many times each word appeared in the sentance)
Where each space-delimited “word” in the string appears in the table along with the number of times it appeared in the input string.
Additional Instructions: Don’t follow punctuation or language rules; a word is any sequence of non-spaces.
Space-delimited means “all spaces are ignored”, no word may contain spaces
There should not be a length 0 string.
Please include screenshots of the code and output, thanks so much!
Example Input: "The cat is on the chair and the bear is on the chair"
Example Output:
The 4
cat 1
is 2
on 2
chair 2
and 1
bear 1
Note: The user will input the sentence each time. (It is not hard coded)
In: Computer Science
Given an 8-word, direct mapped cache, and the sequence of address accesses below, enter the number of misses.
CACHE CONFIG
24
13
24
10
8
8
Given an 8-word, 2-way set associative cache, and the sequence of address accesses below, enter the number of misses.
CACHE CONFIG
22
1
9
22
22
22
Given an 8-word, 2-way set associative cache, and the sequence of address accesses below, enter the number of misses.
CACHE CONFIG
23
23
8
20
9
20
Given an 8-word, direct mapped cache, and the sequence of address accesses below, enter the number of misses.
CACHE CONFIG
5
23
1
24
23
11
Given an 8-word, 4-way set associative cache, and the sequence of address accesses below, enter the number of misses.
CACHE CONFIG
4
4
12
23
12
4
In: Computer Science
Python Program
complete theprocessString(string)function. This function takes in a string as a parameter and prints the average number of characters per word in each sentence in the string. Print the average character count per word for each sentence with 1 decimal precision(see test cases below).-Assume a sentence always ends with a period (.)or when the string ends.
-Assume there is always a blank space character(" ")between each word.
-Do not count the blank spaces between words or the periods as a character.
Two example test cases are:
>>>processString("An example. Dog")
4.5 3.0
(Note that the first sentence has 2 words with a total of 9 characters, so 4.5 characters per word on average.
The second sentence has 1 word of 3 characters, so 3 characters on average.)
>>>processString("This is the first sentence. The second sentence starts after the period. Then a final sentence")
4.4 5.3 4.5
In: Computer Science
Explain the Job Costing process and give a specific example.
Your initial posts must be relevant to the subject and are REQUIRED to contain a word count of no less than 250 words. You may want to prepare your initial posts in Word for your word count, save them, and copy and paste to this board. Spelling and grammar DO count.
Then include two more 3 sentence responces about the same subject
In: Accounting
Explain the Process Costing process and give a specific example.
Your initial posts must be relevant to the subject and are REQUIRED to contain a word count of no less than 250 words. You may want to prepare your initial posts in Word for your word count, save them, and copy and paste to this board. Spelling and grammar DO count.
Then include two more 3 sentence responces about the same subject.
In: Accounting
Write a program that will ask the user for three words (strings). Re-arranges them in ascending order by using a function (it should return void). Global variables are forbidden. Hint: You don't need to exchange the values among variables. You can just print them in the correct order. (C++ Please)
Example of Output:
|
Word 1: apple Word 2: orange Word 3: strawberry -------- orange apple strawberry |
In: Computer Science